From 32862113b005b8607f98d273b805aa110a1d0687 Mon Sep 17 00:00:00 2001 From: Ashutosh Varma Date: Fri, 10 Jan 2020 02:43:21 +0530 Subject: [PATCH] fix telegram uploads filename --- inu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inu.py b/inu.py index ebe6ccc..98704c4 100644 --- a/inu.py +++ b/inu.py @@ -244,8 +244,9 @@ def tel_send(notice): res = tel_send_msg(msg_no_file) else: logger.debug(f"Downloading Complete for file {notice['url']}") + fname = parse.unquote(path.basename(notice['url'])) res = tel_send_file( - msg_file, path.basename(notice['url']), n_res.content) + msg_file, fname, n_res.content) # If /sendDocument fail due to 413(Large File), etc then # try sendMessage as fallback if not res: