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
diff options
context:
space:
mode:
Diffstat (limited to 'src/session.py')
-rw-r--r--src/session.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/session.py b/src/session.py
index d29680152..d286721da 100644
--- a/src/session.py
+++ b/src/session.py
@@ -65,10 +65,14 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
"""
if obj.session != self:
return
+ contact = gajim.contacts.get_contact(self.conn.name, obj.jid,
+ obj.resource)
if self.resource != obj.resource:
self.resource = obj.resource
- if self.control and self.control.resource:
- self.control.change_resource(self.resource)
+ if self.control:
+ self.control.contact = contact
+ if self.control.resource:
+ self.control.change_resource(self.resource)
if obj.mtype == 'chat':
if not obj.stanza.getTag('body') and obj.chatstate is None:
@@ -114,8 +118,6 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
obj.mtype = 'pm'
# Handle chat states
- contact = gajim.contacts.get_contact(self.conn.name, obj.jid,
- obj.resource)
if contact and (not obj.forwarded or not obj.sent):
if self.control and self.control.type_id == \
message_control.TYPE_CHAT: