From 7a1b2b982f431eb591d348fbb799a4d761a13c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 28 Apr 2019 01:02:49 +0100 Subject: plugins: Update use of tab.name to tab.jid where appropriate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugins/replace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/replace.py') 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): -- cgit v1.2.3