update contact instance in chat window when we talk to another resource. Fixes #7700
This commit is contained in:
parent
7d09c4d45b
commit
ea30b6888b
|
@ -463,8 +463,9 @@ class CommonConnection:
|
||||||
msg_iq = iqs
|
msg_iq = iqs
|
||||||
else:
|
else:
|
||||||
msg_iq.setTo(fjid)
|
msg_iq.setTo(fjid)
|
||||||
if resource:
|
r_ = resource or gajim.get_resource_from_jid(fjid)
|
||||||
contact = gajim.contacts.get_contact(self.name, jid, resource)
|
if r_:
|
||||||
|
contact = gajim.contacts.get_contact(self.name, jid, r_)
|
||||||
else:
|
else:
|
||||||
contact = gajim.contacts.get_contact_with_highest_priority(
|
contact = gajim.contacts.get_contact_with_highest_priority(
|
||||||
self.name, jid)
|
self.name, jid)
|
||||||
|
|
|
@ -160,6 +160,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
if ctrl:
|
if ctrl:
|
||||||
self.control = ctrl
|
self.control = ctrl
|
||||||
self.control.set_session(self)
|
self.control.set_session(self)
|
||||||
|
self.control.contact = contact
|
||||||
|
|
||||||
if not pm:
|
if not pm:
|
||||||
self.roster_message2(obj)
|
self.roster_message2(obj)
|
||||||
|
|
Loading…
Reference in New Issue