Commit 98faa71e authored by JC Brand's avatar JC Brand

muc: Ensure message rerenders when occupant is added

parent e6213624
......@@ -116,6 +116,7 @@ converse.plugins.add('converse-message-view', {
this.listenTo(this.model, 'change', this.onChanged);
this.listenTo(this.model, 'destroy', this.fadeOut);
this.listenTo(this.model, 'occupantAdded', this.debouncedRender);
this.listenTo(this.model, 'vcard:change', this.debouncedRender);
},
......
......@@ -288,6 +288,7 @@ converse.plugins.add('converse-muc', {
onOccupantAdded (occupant) {
if (occupant.get('nick') === Strophe.getResourceFromJid(this.get('from'))) {
this.occupant = occupant;
this.trigger('occupantAdded');
this.listenTo(this.occupant, 'destroy', this.onOccupantRemoved);
const chatbox = this?.collection?.chatbox;
if (!chatbox) {
......
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