Skip to content

Align OTR plugin integration with XEP-0364 - #150

Merged
Ri0n merged 13 commits into
masterfrom
fix/otr-xep-integration
Aug 31, 2026
Merged

Ri0n merged 13 commits into
masterfrom
fix/otr-xep-integration

Conversation

@Ri0n

@Ri0n Ri0n commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

This keeps the native qca-otr protocol implementation unchanged and updates only the Psi-side OTR adapter/integration.

  • keep the exact XMPP endpoint JID supplied by routing: native XMPP resources stay full JIDs, while bare JIDs from XMPP transports remain valid OTR endpoints
  • use XEP-0378 caps (urn:xmpp:otr:0) and incoming OTR EME as strong endpoint-scoped signals for XEP-0364 payload semantics
  • preserve legacy OTR HTML semantics for endpoints without those XEP signals: authenticated decrypted rich text is normalized with HtmlNormalizer, while XEP-0364 peers always treat decrypted XML-looking content as literal text
  • use raw plaintext for XEP-0364 peers and legacy HTML escaping for legacy peers before OTR encryption
  • feed whitespace-tagged plaintext through qca-otr so Opportunistic/Always policies can react to the discovery tag, while keeping the original plaintext message visible
  • recognize exact OTRv1/v2/v3 whitespace version tags and record v3 capability per exact endpoint
  • add XEP-0364 processing hints consistently; emit OTR EME only for endpoints known to use XEP-0364 semantics
  • silently ignore OTR protocol traffic received through Message Carbons
  • expire discovery/payload-mode state per exact endpoint on unavailable presence and per account on logout
  • remove obsolete online/login bookkeeping and the old full-to-bare JID normalization helper

The legacy chat menu remains for SMP, session ID, fingerprint and explicit session control. Bare transport endpoints are allowed there as well.

qca-otr is intentionally unchanged.

@Ri0n
Ri0n merged commit 015080f into master Aug 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant