Skip to content
Snippets Groups Projects
Commit 8d7750b2 authored by Brendan Taylor's avatar Brendan Taylor
Browse files

fix multipopup when receiving several unthreaded messages

parent ade56853
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,10 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
# dispatch a received <message> stanza
def received(self, full_jid_with_resource, msgtxt, tim, encrypted, subject, msg):
msg_type = msg.getType()
if not msg_type:
msg_type = 'normal'
msg_id = None
# XEP-0172 User Nickname
......@@ -114,6 +118,14 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
jid_of_control = full_jid_with_resource
highest_contact = gajim.contacts.get_contact_with_highest_priority(
self.conn.name, jid)
if not pm:
if not highest_contact or not highest_contact.resource or \
resource == highest_contact.resource or highest_contact.show == 'offline':
jid_of_control = jid
# Handle chat states
contact = gajim.contacts.get_contact(self.conn.name, jid, resource)
if contact:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment