fix multipopup when receiving several unthreaded messages
This commit is contained in:
parent
ade56853fe
commit
8d7750b203
1 changed files with 12 additions and 0 deletions
|
@ -55,6 +55,10 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
# dispatch a received <message> stanza
|
# dispatch a received <message> stanza
|
||||||
def received(self, full_jid_with_resource, msgtxt, tim, encrypted, subject, msg):
|
def received(self, full_jid_with_resource, msgtxt, tim, encrypted, subject, msg):
|
||||||
msg_type = msg.getType()
|
msg_type = msg.getType()
|
||||||
|
|
||||||
|
if not msg_type:
|
||||||
|
msg_type = 'normal'
|
||||||
|
|
||||||
msg_id = None
|
msg_id = None
|
||||||
|
|
||||||
# XEP-0172 User Nickname
|
# XEP-0172 User Nickname
|
||||||
|
@ -114,6 +118,14 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
|
|
||||||
jid_of_control = full_jid_with_resource
|
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
|
# Handle chat states
|
||||||
contact = gajim.contacts.get_contact(self.conn.name, jid, resource)
|
contact = gajim.contacts.get_contact(self.conn.name, jid, resource)
|
||||||
if contact:
|
if contact:
|
||||||
|
|
Loading…
Add table
Reference in a new issue