mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-01-16 02:42:19 +00:00
minor optimisation to URLS processing
This commit is contained in:
parent
928dfa27be
commit
12b4696e80
@ -11,7 +11,7 @@
|
|||||||
# This file is public domain in the USA and all free countries.
|
# This file is public domain in the USA and all free countries.
|
||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v0.962-109-g517e600
|
#### $$VERSION$$ v0.962-110-g4883c18
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 success (hopefully)
|
# - 0 success (hopefully)
|
||||||
@ -810,7 +810,7 @@ process_message() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# get file URL from telegram
|
# get file URL from telegram
|
||||||
if grep -qs -e '\["result",'"${num}"',"message",".*,"file_id"\]' <<<"${UPDATE}"; then
|
if grep -qs -e '\["result",'"${num}"',"message","[avpsd].*,"file_id"\]' <<<"${UPDATE}"; then
|
||||||
URLS[AUDIO]="$(get_file "${UPD["result",${num},"message","audio","file_id"]}")"
|
URLS[AUDIO]="$(get_file "${UPD["result",${num},"message","audio","file_id"]}")"
|
||||||
URLS[DOCUMENT]="$(get_file "${UPD["result",${num},"message","document","file_id"]}")"
|
URLS[DOCUMENT]="$(get_file "${UPD["result",${num},"message","document","file_id"]}")"
|
||||||
URLS[PHOTO]="$(get_file "${UPD["result",${num},"message","photo",0,"file_id"]}")"
|
URLS[PHOTO]="$(get_file "${UPD["result",${num},"message","photo",0,"file_id"]}")"
|
||||||
|
Loading…
Reference in New Issue
Block a user