summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2022-03-29 15:54:51 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2022-03-29 15:54:51 +0200
commit1322c2b1c8215c452782d6f712c92f852eafb84e (patch)
treed68de00c3d836ce22371e34b194bcad7c28f4352
parent4f9e734a7f87ee2f1e99e4429694b8d3b0dd4186 (diff)
downloadpoezio-1322c2b1c8215c452782d6f712c92f852eafb84e.tar.gz
poezio-1322c2b1c8215c452782d6f712c92f852eafb84e.tar.bz2
poezio-1322c2b1c8215c452782d6f712c92f852eafb84e.tar.xz
poezio-1322c2b1c8215c452782d6f712c92f852eafb84e.zip
plugins/marquee: Ensure a message is sent before correcting
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--plugins/marquee.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/marquee.py b/plugins/marquee.py
index 2fea3ed6..66ec8b70 100644
--- a/plugins/marquee.py
+++ b/plugins/marquee.py
@@ -63,10 +63,12 @@ class Plugin(BasePlugin):
'Replicate the <marquee/> behavior in a message')
@command_args_parser.raw
- def command_marquee(self, args):
+ async def command_marquee(self, args):
+ if not args:
+ return None
tab = self.api.current_tab()
args = xhtml.clean_text(xhtml.convert_simple_to_full_colors(args))
- asyncio.ensure_future(tab.command_say(args))
+ await tab.command_say(args)
is_muctab = isinstance(tab, tabs.MucTab)
msg_id = tab.last_sent_message["id"]
jid = tab.jid