From 71cfc7aba1fa69834b53556bc2da352ca516e240 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Fri, 11 Sep 2020 16:01:15 +0200 Subject: [PATCH] Bugfix. Include model when manually triggering change event --- src/headless/converse-muc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/headless/converse-muc.js b/src/headless/converse-muc.js index d6411434c..a5cb9c810 100644 --- a/src/headless/converse-muc.js +++ b/src/headless/converse-muc.js @@ -2349,9 +2349,10 @@ converse.plugins.add('converse-muc', { // Set connection_status before creating the occupant, but // only trigger afterwards, so that plugins can access the // occupant in their event handlers. + const old_status = this.session.get('connection_status'); this.session.save('connection_status', converse.ROOMSTATUS.ENTERED, {'silent': true}); this.updateOccupantsOnPresence(stanza); - this.session.trigger('change:connection_status'); + this.session.trigger('change:connection_status', this.session, old_status); } else { this.updateOccupantsOnPresence(stanza); }