From 8a127b4e4dcfc1f2268c26466753c26f4d9194a2 Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Thu, 5 Nov 2009 16:53:30 +0100 Subject: [PATCH] Several small bugfixes: Add missing accout parameter to constructors. --- src/common/contacts.py | 4 +--- src/session.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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)