Skip to content

fix: query bare JID for PEP features during discovery#2176

Merged
jubalh merged 1 commit into
masterfrom
fix/pubsub
Jun 15, 2026
Merged

fix: query bare JID for PEP features during discovery#2176
jubalh merged 1 commit into
masterfrom
fix/pubsub

Conversation

@jubalh

@jubalh jubalh commented Jun 13, 2026

Copy link
Copy Markdown
Member

XEP-0163 (Personal Eventing Protocol) states that service discovery information queries regarding PEP capabilities must be sent to the users bare JID in order to determine support.

Profanity only queried the server domain JID and its generic disco#items on connect, but never queried the users own bare JID.

Because ejabberd advertises PEP and PubSub features on both the server JID and the bare JID this bug was kind of invisible. However, Prosody strictly advertises PEP capabilities only on the users bare JID.

This discovery failure became a hard blocker for OMEMO on Prosody servers following commit 01c781f ("Don't publish keys if the server doesn't support pubsub."), which turned the check for publish-options into an early-return condition.

We now query our own bare JID during feature discovery on connect and insert it into conn.features_by_jid.

See-also: https://xmpp.org/extensions/xep-0163.html
Ref: 01c781f

XEP-0163 (Personal Eventing Protocol) states that service discovery
information queries regarding PEP capabilities must be sent to the users
bare JID in order to determine support.

Profanity only queried the server domain JID and its
generic disco#items on connect, but never queried the
users own bare JID.

Because ejabberd advertises PEP and PubSub features on both the
server JID and the bare JID this bug was kind of invisible.
However, Prosody strictly advertises PEP capabilities only on the users bare JID.

This discovery failure became a hard blocker for OMEMO on Prosody
servers following commit 01c781f ("Don't publish keys if the server
doesn't support pubsub."), which turned the check for publish-options
into an early-return condition.

We now query our own bare JID during feature discovery
on connect and insert it into conn.features_by_jid.

See-also: https://xmpp.org/extensions/xep-0163.html
Ref: 01c781f
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
@jubalh jubalh added this to the next milestone Jun 13, 2026
@jubalh jubalh self-assigned this Jun 13, 2026
@mdosch

mdosch commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

I don't see anymore pubsub errors. OMEMO works, but it also did before.

@jubalh jubalh merged commit 4e4709e into master Jun 15, 2026
12 checks passed
@jubalh jubalh deleted the fix/pubsub branch June 15, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants