mark outgoing 1:1 messages <markable/> so peers can send displayed markers (#18)
iOS CI / Build and Test SwiftUI App (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build Unsigned iOS IPA (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build macOS ZIP (push) Canceled after 0s

Martin only attaches <request/> (XEP-0184 receipts) in createMessage, so
Conversations/Monal had no licence to answer with <displayed/> and read
state was stuck on delivered. MUC stays exempt per XEP-0333.
This commit is contained in:
wt committed 2026-09-18 13:16:47 +07:00
1 parent 338affd89e
commit 0d6c562abd
2 files changed
+11

No files matched your search

+7
View File
@@ -967,6 +967,13 @@ final class XMPPService {
let message = chat.createMessage(text: wireBody, id: messageID)
addOriginID(messageID, to: message)
// XEP-0333: peers only answer with `<displayed/>` when the outgoing
// stanza is marked `<markable/>`. Martin adds `<request/>` (receipts)
// on its own but never markable, so 1:1 read state stayed stuck on
// "delivered". The element stays outside the OMEMO payload, which is
// exactly where Monal/Conversations look for it. MUC is exempt —
// XEP-0333 forbids markers in groupchats.
message.isMarkable = true
message.lastMessageCorrectionId = replacingMessageID
if chatStatesEnabled { message.chatState = .active }
addReply(replyTo, fallback: replyFallback, to: message)