diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2021-12-14 11:05:58 +0100 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2021-12-14 11:22:37 +0100 |
commit | 4f6bc9073ea24b911de038cbf94395789bf63fa9 (patch) | |
tree | 8d54bacba7138d34453e73413e0c66d7a5d57bbf /plugins/upload.py | |
parent | 88db537027e41280f43ba661325051a1f04055f1 (diff) | |
download | poezio-4f6bc9073ea24b911de038cbf94395789bf63fa9.tar.gz poezio-4f6bc9073ea24b911de038cbf94395789bf63fa9.tar.bz2 poezio-4f6bc9073ea24b911de038cbf94395789bf63fa9.tar.xz poezio-4f6bc9073ea24b911de038cbf94395789bf63fa9.zip |
/upload to original tab and not current tab (thanks jonas)"
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'plugins/upload.py')
-rw-r--r-- | plugins/upload.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/upload.py b/plugins/upload.py index 9a70a965..fbf41034 100644 --- a/plugins/upload.py +++ b/plugins/upload.py @@ -66,10 +66,10 @@ class Plugin(BasePlugin): return None return url - async def send_upload(self, filename): + async def send_upload(self, filename, tab): url = await self.upload(filename) if url is not None: - self.embed.embed_image_url(url) + self.embed.embed_image_url(url, tab) @command_args_parser.quoted(1) def command_upload(self, args): @@ -78,7 +78,8 @@ class Plugin(BasePlugin): return filename, = args filename = expanduser(filename) - asyncio.create_task(self.send_upload(filename)) + tab = self.api.current_tab() + asyncio.create_task(self.send_upload(filename, tab)) @staticmethod def completion_filename(the_input): |