summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-04-27 23:52:36 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-04-27 23:52:36 +0100
commit89a9b33e52a515cbaa9bd766133883540d163e33 (patch)
tree1708ed3691ffd04e15d3ea190ed63fc3882959ed
parentef5c27885c7143034835cb06d0e45bb041a1f719 (diff)
downloadpoezio-89a9b33e52a515cbaa9bd766133883540d163e33.tar.gz
poezio-89a9b33e52a515cbaa9bd766133883540d163e33.tar.bz2
poezio-89a9b33e52a515cbaa9bd766133883540d163e33.tar.xz
poezio-89a9b33e52a515cbaa9bd766133883540d163e33.zip
Replace tab.name with tab.jid
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--poezio/core/handlers.py8
-rw-r--r--poezio/tabs/basetabs.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 030a43e5..b79a853b 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -235,7 +235,7 @@ class HandlerCore:
# Differentiate both type of messages, and call the appropriate handler.
jid_from = message['from']
for tab in self.core.get_tabs(tabs.MucTab):
- if tab.name == jid_from.bare:
+ if tab.jid.bare == jid_from.bare:
if jid_from.resource:
self.on_groupchat_private_message(message, sent=False)
return
@@ -247,7 +247,7 @@ class HandlerCore:
"""
jid_from = message['from']
for tab in self.core.get_tabs(tabs.MucTab):
- if tab.name == jid_from.bare:
+ if tab.jid.bare == jid_from.bare:
if jid_from.full == jid_from.bare:
self.core.room_error(message, jid_from.bare)
else:
@@ -1396,12 +1396,12 @@ class HandlerCore:
jid_from = message['from']
self.core.information('%s requests your attention!' % jid_from, 'Info')
for tab in self.core.tabs:
- if tab.name == jid_from:
+ if tab.jid == jid_from:
tab.state = 'attention'
self.core.refresh_tab_win()
return
for tab in self.core.tabs:
- if tab.name == jid_from.bare:
+ if tab.jid.bare == jid_from.bare:
tab.state = 'attention'
self.core.refresh_tab_win()
return
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 599784bb..dbe92a32 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -660,7 +660,7 @@ class ChatTab(Tab):
return msg
def get_dest_jid(self) -> JID:
- return self.name
+ return self.jid
@refresh_wrapper.always
def command_clear(self, ignored):
@@ -837,7 +837,7 @@ class OneToOneTab(ChatTab):
return
self.__status = status
hide_status_change = config.get_by_tabname('hide_status_change',
- safeJID(self.name).bare)
+ self.jid.bare)
now = datetime.now()
dff = now - self.last_remote_message
if hide_status_change > -1 and dff.total_seconds() > hide_status_change: