Commit 118a84f1 authored by JC Brand's avatar JC Brand

Bugfix. Make sure outgoing messages all have unique ids

parent e2b5f1d1
......@@ -339,6 +339,7 @@
getOutgoingMessageAttributes (text, spoiler_hint) {
const is_spoiler = this.get('composing_spoiler');
return _.extend(this.toJSON(), {
'id': _converse.connection.getUniqueId(),
'fullname': _converse.xmppstatus.get('fullname'),
'from': _converse.bare_jid,
'sender': 'me',
......
......@@ -166,15 +166,13 @@
},
sendMessage (attrs) {
const { _converse } = this.__super__;
const message = this.messages.create(attrs);
if (this.get('omemo_active')) {
const message = this.messages.create(attrs);
this.getBundlesAndBuildSessions()
.then((bundles) => this.createOMEMOMessageStanza(message, bundles))
.then((stanza) => this.sendMessageStanza(stanza));
} else {
this.sendMessageStanza(this.createMessageStanza(message));
return this.__super__.sendMessage.apply(this, arguments);
}
},
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment