diff --git a/src/common/contacts.py b/src/common/contacts.py index 35a9f39b5..19ffaa76f 100644 --- a/src/common/contacts.py +++ b/src/common/contacts.py @@ -46,8 +46,6 @@ class CommonContact(XMPPEntity): XMPPEntity.__init__(self, jid, account, resource) - self.jid = jid - self.resource = resource self.show = show self.status = status self.name = name @@ -637,7 +635,7 @@ class Contacts: def create_gc_contact(self, room_jid, account, name='', show='', status='', role='', affiliation='', jid='', resource=''): - return GC_Contact(room_jid, name, show, status, role, affiliation, jid, + return GC_Contact(room_jid, account, name, show, status, role, affiliation, jid, resource) def add_gc_contact(self, account, gc_contact): diff --git a/src/session.py b/src/session.py index 9143e22a2..6438c518e 100644 --- a/src/session.py +++ b/src/session.py @@ -203,7 +203,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession): if not contact: # contact is not in the roster, create a fake one to display # notification - contact = contacts.Contact(jid=jid, resource=resource) + contact = gajim.contacts.create_contact(jid=jid, account=self.conn.name, resource=resource) advanced_notif_num = notify.get_advanced_notification('message_received', self.conn.name, contact)