diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 93ebde200..498a7bd02 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -1689,7 +1689,7 @@ class GroupchatControl(ChatControlBase): gajim.interface.instances[self.account]['infos'][c2.jid].window.present() else: gajim.interface.instances[self.account]['infos'][c2.jid] = \ - vcard.VcardWindow(c2, self.account) + vcard.VcardWindow(c2, self.account, is_fake = True) def on_history(self, widget, nick): jid = gajim.construct_fjid(self.room_jid, nick) diff --git a/src/vcard.py b/src/vcard.py index 427f827c0..91ef8cd52 100644 --- a/src/vcard.py +++ b/src/vcard.py @@ -61,7 +61,7 @@ def get_avatar_pixbuf_encoded_mime(photo): class VcardWindow: '''Class for contact's information window''' - def __init__(self, contact, account, vcard = False): + def __init__(self, contact, account, vcard = False, is_fake = False): # the contact variable is the jid if vcard is true self.xml = gtk.glade.XML(GTKGUI_GLADE, 'vcard_information_window', APP) self.window = self.xml.get_widget('vcard_information_window') @@ -79,6 +79,7 @@ class VcardWindow: self.contact = contact # don't use it if vcard is true self.account = account self.vcard = vcard + self.is_fake = is_fake self.avatar_mime_type = None self.avatar_encoded = None @@ -368,10 +369,7 @@ class VcardWindow: self.fill_status_label() - is_fake = False - if gajim.contacts.is_pm_from_jid(self.account, self.contact.jid): - is_fake = True - gajim.connections[self.account].request_vcard(self.contact.jid, is_fake) + gajim.connections[self.account].request_vcard(self.contact.jid, self.is_fake) def add_to_vcard(self, vcard, entry, txt): '''Add an information to the vCard dictionary'''