Ver código fonte

Bugfix. Don't pass in roster contact attrs to `api.chats.open`

The `id` attr of the xmpp-status obj gets passed in when opening a chat
with our own JID, which causes problems because the JID should be the
`id`.
JC Brand 5 meses atrás
pai
commit
eff51c64db

+ 1 - 4
src/headless/plugins/roster/contact.js

@@ -64,10 +64,7 @@ class RosterContact extends ColorAwareModel(Model) {
     }
 
     openChat () {
-        // XXX: Doubtful whether it's necessary to pass in the contact
-        // attributes hers. If so, we should perhaps look them up inside the
-        // `open` API method.
-        api.chats.open(this.get('jid'), this.attributes, true);
+        api.chats.open(this.get('jid'), {}, true);
     }
 
     getDisplayName () {

+ 1 - 1
src/plugins/rosterview/contactview.js

@@ -44,7 +44,7 @@ export default class RosterContact extends CustomElement {
      */
     openChat(ev) {
         ev?.preventDefault?.();
-        api.chats.open(this.model.get('jid'), this.model.attributes, true);
+        api.chats.open(this.model.get('jid'), {}, true);
     }
 
     /**