diff --git a/src/common/caps.py b/src/common/caps.py index 95598449c..4473bc93e 100644 --- a/src/common/caps.py +++ b/src/common/caps.py @@ -228,12 +228,14 @@ class ConnectionCaps(object): # we will put these into proper Contact object and ask # for disco... so that disco will learn how to interpret # these caps + pm_ctrl = None jid = helpers.get_full_jid_from_iq(presence) contact = gajim.contacts.get_contact_from_full_jid(self.name, jid) if contact is None: room_jid, nick = gajim.get_room_and_nick_from_fjid(jid) contact = gajim.contacts.get_gc_contact( self.name, room_jid, nick) + pm_ctrl = gajim.interface.msg_win_mgr.get_control(jid, self.name) if contact is None: # TODO: a way to put contact not-in-roster # into Contacts @@ -267,6 +269,8 @@ class ConnectionCaps(object): contact.caps_node = node contact.caps_hash_method = hash_method contact.caps_hash = hash + if pm_ctrl: + pm_ctrl.update_contact() def _capsDiscoCB(self, jid, node, identities, features, dataforms): contact = gajim.contacts.get_contact_from_full_jid(self.name, jid) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 0fd6f5306..3e6cb971a 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -162,6 +162,9 @@ class PrivateChatControl(ChatControl): self.got_connected() ChatControl.update_ui(self) + def update_contact(self): + self.contact = gajim.contacts.contact_from_gc_contact(self.gc_contact) + class GroupchatControl(ChatControlBase): TYPE_ID = message_control.TYPE_GC