From b47828c5c153606ff7be63f481b10391afd305db Mon Sep 17 00:00:00 2001 From: eta Date: Sun, 2 Aug 2020 11:05:52 +0100 Subject: [PATCH] Fix sending read receipts in MUCs - The "by" attribute of the element wasn't being set correctly (it was just set to the localpart instead of the full JID, which is out of spec). - This meant that Conversations (at least) wouldn't trust it, and would try to use the origin-id instead, which couldn't be looked up when a chat marker was sent to the bridge. - This fixes that. - (and adds another space to the put-url debug info) --- stuff.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stuff.lisp b/stuff.lisp index 6e45f80..860ef14 100644 --- a/stuff.lisp +++ b/stuff.lisp @@ -154,7 +154,7 @@ MEDIA-TYPE is one of (:image :video :audio :document)." filename length-bytes mime-type) (lambda (slot) (destructuring-bind ((put-url . headers) get-url) slot - (format *debug-io* "~&got put-url: ~A~% get-url: ~A~%" put-url get-url) + (format *debug-io* "~&got put-url: ~A~% get-url: ~A~%" put-url get-url) (with-promise (resolve reject) (bt:make-thread (lambda () @@ -437,7 +437,10 @@ WhatsXMPP represents users as u440123456789 and groups as g1234-5678." (cxml:with-element "stanza-id" (cxml:attribute "xmlns" +unique-stanzas-ns+) (cxml:attribute "id" xmpp-id) - (cxml:attribute "by" group-localpart)) + (cxml:attribute "by" (concatenate 'string + group-localpart + "@" + (component-name comp)))) (cxml:with-element "origin-id" (cxml:attribute "xmlns" +unique-stanzas-ns+) (cxml:attribute "id" wa-id)))