1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
Publish OMEMO bundle and device list with publish-options regardless of the
server domain's advertised features.
connection_supports() only inspects features_by_jid, which connection.c seeds
with the server domain (conn.domain) plus whatever disco#items returns for that
domain. The account's own bare JID -- which is what actually hosts the PEP
service used for OMEMO -- is never added to that table. On deployments whose
host disco#info is trimmed down, the check therefore fails even though the
account itself advertises
http://jabber.org/protocol/pubsub#publish-options.
Two separate symptoms follow:
* omemo_bundle_publish() returned early and sent nothing at all, so the
bundles:<device_id> node was never created. Contacts fetching it got
item-not-found and no session could ever be established.
* omemo_devicelist_publish() published without publish-options, so the
devicelist node was auto-created with the server's default access model
(presence on Prosody) instead of open. Contacts without a presence
subscription could not read the device list, so they never learned which
bundle to request.
Send publish-options unconditionally in both cases. If a server genuinely
rejects them, the existing recovery paths handle it: _omemo_bundle_publish_result()
falls back to configuring the node explicitly, and _omemo_devicelist_publish_result()
reconfigures on precondition-not-met.
--- a/src/xmpp/omemo.c
+++ b/src/xmpp/omemo.c
@@ -44,11 +44,7 @@
log_debug("[OMEMO] publish device list");
- if (connection_supports(XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS)) {
- stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open");
- } else {
- log_debug("[OMEMO] Cannot publish devicelist: no PUBSUB feature announced");
- }
+ stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open");
iq_id_handler_add(xmpp_stanza_get_id(iq), _omemo_devicelist_publish_result, NULL, NULL);
@@ -90,11 +86,6 @@
void
omemo_bundle_publish(gboolean first)
{
- if (!connection_supports(XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS)) {
- cons_show("OMEMO: Cannot publish bundle: no PUBSUB feature announced");
- log_debug("[OMEMO] Cannot publish bundle: no PUBSUB feature announced");
- return;
- }
log_debug("[OMEMO] publish own OMEMO bundle");
xmpp_ctx_t* const ctx = connection_get_ctx();
unsigned char* identity_key = NULL;
|