summaryrefslogtreecommitdiff
path: root/plugins/replace.py
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-04-28 01:02:49 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-04-28 01:02:49 +0100
commit7a1b2b982f431eb591d348fbb799a4d761a13c65 (patch)
tree4bb79aa2b03b9fd303dffb747e17319bcf0d722f /plugins/replace.py
parent200f229464d87791f9cc67a03df0259741bf24a6 (diff)
downloadpoezio-7a1b2b982f431eb591d348fbb799a4d761a13c65.tar.gz
poezio-7a1b2b982f431eb591d348fbb799a4d761a13c65.tar.bz2
poezio-7a1b2b982f431eb591d348fbb799a4d761a13c65.tar.xz
poezio-7a1b2b982f431eb591d348fbb799a4d761a13c65.zip
plugins: Update use of tab.name to tab.jid where appropriate
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'plugins/replace.py')
-rw-r--r--plugins/replace.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/replace.py b/plugins/replace.py
index 7e259dab..9646a817 100644
--- a/plugins/replace.py
+++ b/plugins/replace.py
@@ -102,11 +102,11 @@ def replace_random_user(message, tab):
if isinstance(tab, tabs.MucTab):
return random.choice(tab.users).nick
elif isinstance(tab, tabs.PrivateTab):
- return random.choice([JID(tab.name).resource, tab.own_nick])
+ return random.choice([tab.jid.resource, tab.own_nick])
else:
# that doesn’t make any sense. By why use this pattern in a
# ConversationTab anyway?
- return str(tab.name)
+ return tab.jid.full
def replace_dice(message, tab):