Explorar o código

Set `from_real_jid` on the message when its occupant is attached.

JC Brand %!s(int64=3) %!d(string=hai) anos
pai
achega
2172409fec
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/headless/plugins/muc/message.js

+ 4 - 0
src/headless/plugins/muc/message.js

@@ -87,6 +87,10 @@ const ChatRoomMessageMixin = {
         }
 
         this.occupant = occupant;
+        if (occupant.get('jid')) {
+            this.save('from_real_jid', occupant.get('jid'));
+        }
+
         this.trigger('occupantAdded');
         this.listenTo(this.occupant, 'destroy', this.onOccupantRemoved);
         this.stopListening(chatbox.occupants, 'add', this.onOccupantAdded);