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:
authorYann Leboulanger <asterix@lagaule.org>2015-05-17 16:40:42 +0300
committerYann Leboulanger <asterix@lagaule.org>2015-05-17 16:40:42 +0300
commit38b940ef26a7f948d28287444ced5b9f5a0fa43c (patch)
tree99382426a3ad6ecc0d6053ea5002552ddc71e40d /src/session.py
parent4674a64d668207a7e04f79492b2cc5810d45003b (diff)
update control.contact when we get a message from another resource. Fixes #7919
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: