Преглед на файлове

Set fullname from roster contact

JC Brand преди 7 години
родител
ревизия
401513e695
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      src/converse-chatboxes.js

+ 4 - 1
src/converse-chatboxes.js

@@ -337,7 +337,10 @@
                         resource = from_resource;
                         resource = from_resource;
                     }
                     }
                     // Get chat box, but only create a new one when the message has a body.
                     // Get chat box, but only create a new one when the message has a body.
-                    const chatbox = this.getChatBox(contact_jid, {}, !_.isNull(message.querySelector('body'))),
+                    const attrs = {
+                        'fullname': _.get(_converse.api.contacts.get(contact_jid), 'attributes.fullname')
+                    }
+                    const chatbox = this.getChatBox(contact_jid, attrs, !_.isNull(message.querySelector('body'))),
                           msgid = message.getAttribute('id');
                           msgid = message.getAttribute('id');
 
 
                     if (chatbox) {
                     if (chatbox) {