Bladeren bron

Emit the original message, not just the forwarded part

Otherwise we receive HTML5 notifications for MAM messages because they can't be
identified as such.
JC Brand 8 jaren geleden
bovenliggende
commit
c58348dd02
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      src/converse-core.js

+ 1 - 1
src/converse-core.js

@@ -1532,7 +1532,7 @@
                     contact_jid = from_bare_jid;
                     contact_jid = from_bare_jid;
                     resource = from_resource;
                     resource = from_resource;
                 }
                 }
-                _converse.emit('message', message);
+                _converse.emit('message', original_stanza);
                 // Get chat box, but only create a new one when the message has a body.
                 // Get chat box, but only create a new one when the message has a body.
                 chatbox = this.getChatBox(contact_jid, !_.isNull(message.querySelector('body')));
                 chatbox = this.getChatBox(contact_jid, !_.isNull(message.querySelector('body')));
                 if (!chatbox) {
                 if (!chatbox) {