Commit 8d3cd687 authored by JC Brand's avatar JC Brand

Pass chatbox or _converse as context

parent bbcfc9f9
......@@ -1205,7 +1205,7 @@ converse.plugins.add('converse-omemo', {
}
});
function parseEncryptedMessage (attrs) {
function parseEncryptedMessage (stanza, attrs) {
if (attrs.is_encrypted) {
// https://xmpp.org/extensions/xep-0384.html#usecases-receiving
if (attrs.encrypted.prekey === true) {
......
......@@ -537,7 +537,7 @@ const st = {
* *Hook* which allows plugins to add additional parsing
* @event _converse#parseMessage
*/
return api.hook('parseMessage', attrs);
return api.hook('parseMessage', _converse, attrs);
},
/**
......@@ -685,7 +685,7 @@ const st = {
* *Hook* which allows plugins to add additional parsing
* @event _converse#parseMUCMessage
*/
return api.hook('parseMUCMessage', stanza, attrs);
return api.hook('parseMUCMessage', chatbox, attrs);
},
/**
......
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