From d8e0b5c9759ea0ffe5fc5a2df34e8e547d7671b2 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Wed, 22 May 2019 09:50:48 +0200 Subject: [PATCH] fix get_file --- bashbot.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index ed73f47..1194cd8 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v80-rc1-0-gb096ea3 +#### $$VERSION$$ v80-rc1-2-g9ef99ee # # Exit Codes: # - 0 sucess (hopefully) @@ -187,9 +187,8 @@ delete_message() { get_file() { [ "$1" = "" ] && return - local JSON='"file_id": '"${1}" - sendJson "" "${JSON}" "${GETFILE_URL}" - jsonGetString <<< "${URL}/""${res}" '"result","file_path"' + sendJson "" '"file_id": '"${1}""${GETFILE_URL}" + printf '%s\n' "${URL}"/"$(jsonGetString <<< "${res}" '"result","file_path"')" } # curl is preffered, but may not availible on ebedded systems