From 4f6bc9073ea24b911de038cbf94395789bf63fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 14 Dec 2021 11:05:58 +0100 Subject: /upload to original tab and not current tab (thanks jonas)" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugins/embed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/embed.py') diff --git a/plugins/embed.py b/plugins/embed.py index 3ce2a9d3..4a68f035 100644 --- a/plugins/embed.py +++ b/plugins/embed.py @@ -29,8 +29,8 @@ class Plugin(BasePlugin): help='Embed an image url into the contact\'s client', usage='') - def embed_image_url(self, url): - tab = self.api.current_tab() + def embed_image_url(self, url, tab=None): + tab = tab or self.api.current_tab() message = self.core.xmpp.make_message(tab.jid) message['body'] = url message['oob']['url'] = url -- cgit v1.2.3