Skip to content

Commit

Permalink
fix telegram uploads filename
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshvarma committed Jan 9, 2020
1 parent e8a5c05 commit 3286211
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3286211

Please sign in to comment.