try to improve behavour with contacs connected with several resources
This commit is contained in:
parent
aaccec79cf
commit
e8426d4cef
2 changed files with 2 additions and 8 deletions
|
@ -375,7 +375,7 @@ class Interface:
|
||||||
is_highest = (highest and highest.resource == resource)
|
is_highest = (highest and highest.resource == resource)
|
||||||
|
|
||||||
ctrl = self.msg_win_mgr.get_control(jid, account)
|
ctrl = self.msg_win_mgr.get_control(jid, account)
|
||||||
if ctrl and ctrl.session and ctrl.session.resource == resource:
|
if ctrl and ctrl.session and len(obj.contact_list) > 1:
|
||||||
ctrl.remove_session(ctrl.session)
|
ctrl.remove_session(ctrl.session)
|
||||||
|
|
||||||
def handle_event_msgerror(self, obj):
|
def handle_event_msgerror(self, obj):
|
||||||
|
|
|
@ -60,7 +60,6 @@ class MessageControl(object):
|
||||||
self.resource = resource
|
self.resource = resource
|
||||||
|
|
||||||
self.session = None
|
self.session = None
|
||||||
self.other_sessions = []
|
|
||||||
|
|
||||||
gajim.last_message_time[self.account][self.get_full_jid()] = 0
|
gajim.last_message_time[self.account][self.get_full_jid()] = 0
|
||||||
|
|
||||||
|
@ -203,10 +202,6 @@ class MessageControl(object):
|
||||||
|
|
||||||
if oldsession:
|
if oldsession:
|
||||||
oldsession.control = None
|
oldsession.control = None
|
||||||
self.other_sessions.append(oldsession)
|
|
||||||
|
|
||||||
if self.session in self.other_sessions:
|
|
||||||
self.other_sessions.remove(self.session)
|
|
||||||
|
|
||||||
crypto_changed = bool(session and isinstance(session,
|
crypto_changed = bool(session and isinstance(session,
|
||||||
EncryptedStanzaSession) and session.enable_encryption) != \
|
EncryptedStanzaSession) and session.enable_encryption) != \
|
||||||
|
@ -229,7 +224,6 @@ class MessageControl(object):
|
||||||
last_session = self.other_sessions.pop(0)
|
last_session = self.other_sessions.pop(0)
|
||||||
if session not in self.other_sessions:
|
if session not in self.other_sessions:
|
||||||
self.other_sessions.append(session)
|
self.other_sessions.append(session)
|
||||||
if last_session:
|
|
||||||
self.session = last_session
|
self.session = last_session
|
||||||
|
|
||||||
def _nec_message_outgoing(self, obj):
|
def _nec_message_outgoing(self, obj):
|
||||||
|
|
Loading…
Add table
Reference in a new issue