Fix attention handler
This commit is contained in:
parent
076314fc21
commit
558f4fa8b3
1 changed files with 10 additions and 11 deletions
|
@ -1484,17 +1484,16 @@ class HandlerCore:
|
|||
"""
|
||||
jid_from = message['from']
|
||||
self.core.information('%s requests your attention!' % jid_from, 'Info')
|
||||
for tab in self.core.tabs:
|
||||
if tab.jid == jid_from:
|
||||
tab.state = 'attention'
|
||||
self.core.refresh_tab_win()
|
||||
return
|
||||
for tab in self.core.tabs:
|
||||
if tab.jid.bare == jid_from.bare:
|
||||
tab.state = 'attention'
|
||||
self.core.refresh_tab_win()
|
||||
return
|
||||
self.core.information('%s tab not found.' % jid_from, 'Error')
|
||||
tab = (
|
||||
self.core.tabs.by_name_and_class(
|
||||
jid_from.full, tabs.ChatTab
|
||||
) or self.core.tabs.by_name_and_class(
|
||||
jid_from.bare, tabs.ChatTab
|
||||
)
|
||||
)
|
||||
if tab and tab is not self.core.tabs.current_tab:
|
||||
tab.state = "attention"
|
||||
self.core.refresh_tab_win()
|
||||
|
||||
def outgoing_stanza(self, stanza):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue