Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2008-10-12 15:20:35 +0400
committerYann Leboulanger <asterix@lagaule.org>2008-10-12 15:20:35 +0400
commit7d3bff5b583da0bb2ab934107bc553c3c5f1ce5a (patch)
tree0b32e4be7b3eb3bf1448fb37bcaf4fb81ce808ec /src
parentb9db39e0a9d6411525089aaba556d76b69783c23 (diff)
update Contact instance in privateChatControl. see #4292
Diffstat (limited to 'src')
-rw-r--r--src/common/caps.py4
-rw-r--r--src/groupchat_control.py3
2 files changed, 7 insertions, 0 deletions
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