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>2014-03-29 00:29:42 +0400
committerYann Leboulanger <asterix@lagaule.org>2014-03-29 00:29:42 +0400
commita1592ee2102c6e52686e0207e5a5c7f6a6a08f5d (patch)
tree4c1d21d152893f800d539a5e4abafb09a8bb78b2
parentf2e5b26f4959b185124a1fb633f7b5d0e61342a7 (diff)
update contact instance in chat window when we talk to another resource. Fixes #7700
-rw-r--r--src/common/connection.py5
-rw-r--r--src/session.py1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/common/connection.py b/src/common/connection.py
index f2483f794..7251f4e2c 100644
--- a/src/common/connection.py
+++ b/src/common/connection.py
@@ -464,8 +464,9 @@ class CommonConnection:
msg_iq = iqs
else:
msg_iq.setTo(fjid)
- if resource:
- contact = gajim.contacts.get_contact(self.name, jid, resource)
+ r_ = resource or gajim.get_resource_from_jid(fjid)
+ if r_:
+ contact = gajim.contacts.get_contact(self.name, jid, r_)
else:
contact = gajim.contacts.get_contact_with_highest_priority(
self.name, jid)
diff --git a/src/session.py b/src/session.py
index b0c8ad67d..d29680152 100644
--- a/src/session.py
+++ b/src/session.py
@@ -160,6 +160,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
if ctrl:
self.control = ctrl
self.control.set_session(self)
+ self.control.contact = contact
if not pm:
self.roster_message2(obj)