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:
-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)