mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-21 23:25:08 +00:00
modules/sendMessage: send_file: fix double escaped caption
This commit is contained in:
parent
67d75feace
commit
58e6d0aaf6
@ -6,7 +6,7 @@
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
# shellcheck disable=SC1117
|
||||
#### $$VERSION$$ v1.52-dev-2-ga2a3927
|
||||
#### $$VERSION$$ v1.52-dev-11-g67d75fe
|
||||
|
||||
# will be automatically sourced from bashbot
|
||||
|
||||
@ -272,8 +272,7 @@ fi
|
||||
# supports local file, URL and file_id
|
||||
# $1 chat, $2 file https::// file_id:// , $3 caption, $4 extension (optional)
|
||||
send_file(){
|
||||
local url what num stat media capt file="$2" ext="$4"
|
||||
capt="$(JsonEscape "$3")"
|
||||
local url what num stat media capt="$3" file="$2" ext="$4"
|
||||
if [[ "${file}" =~ ^https*:// ]]; then
|
||||
media="URL"
|
||||
elif [[ "${file}" == file_id://* ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user