diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2014-03-29 00:29:42 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2014-03-29 00:29:42 +0400 |
commit | a1592ee2102c6e52686e0207e5a5c7f6a6a08f5d (patch) | |
tree | 4c1d21d152893f800d539a5e4abafb09a8bb78b2 | |
parent | f2e5b26f4959b185124a1fb633f7b5d0e61342a7 (diff) |
update contact instance in chat window when we talk to another resource. Fixes #7700
-rw-r--r-- | src/common/connection.py | 5 | ||||
-rw-r--r-- | src/session.py | 1 |
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) |