Commit e6213624 authored by JC Brand's avatar JC Brand

mam: include chatbox in data sent via `MAMResult`

parent a0de4250
......@@ -60,7 +60,8 @@ const MAMEnabledChat = {
* work based on the MAM result before calling the handlers here.
* @event _converse#MAMResult
*/
await api.trigger('MAMResult', result, query, {'synchronous': true});
const data = { query, 'chatbox': this, 'messages': result.messages };
await api.trigger('MAMResult', data, {'synchronous': true});
result.messages.forEach(m => this.queueMessage(m));
if (result.error) {
......
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