fix get_file

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2019-05-22 09:50:48 +02:00
parent 9ef99ee1b8
commit d8e0b5c975

View File

@ -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$$ v80-rc1-0-gb096ea3 #### $$VERSION$$ v80-rc1-2-g9ef99ee
# #
# Exit Codes: # Exit Codes:
# - 0 sucess (hopefully) # - 0 sucess (hopefully)
@ -187,9 +187,8 @@ delete_message() {
get_file() { get_file() {
[ "$1" = "" ] && return [ "$1" = "" ] && return
local JSON='"file_id": '"${1}" sendJson "" '"file_id": '"${1}""${GETFILE_URL}"
sendJson "" "${JSON}" "${GETFILE_URL}" printf '%s\n' "${URL}"/"$(jsonGetString <<< "${res}" '"result","file_path"')"
jsonGetString <<< "${URL}/""${res}" '"result","file_path"'
} }
# curl is preffered, but may not availible on ebedded systems # curl is preffered, but may not availible on ebedded systems