diff --git a/bashbot.sh b/bashbot.sh index 81eaa57..ab26bb8 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -12,7 +12,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.70-5-g82eb3c7 +#### $$VERSION$$ v0.70-6-g5b8f2a2 # # Exit Codes: # - 0 sucess (hopefully) diff --git a/modules/inline.sh b/modules/inline.sh index 709e0f2..37f7feb 100644 --- a/modules/inline.sh +++ b/modules/inline.sh @@ -5,7 +5,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.70-5-g82eb3c7 +#### $$VERSION$$ v0.70-6-g5b8f2a2 # source from commands.sh to use the inline functions @@ -14,9 +14,8 @@ declare -A iQUERY export iQUERY process_inline() { -set -x local num="${1}" - iQUERY[0]="$(JsonGetString <<<"${UPDATE}" '"result",0,"inline_query","query"')" + iQUERY[0]="$(JsonDecode "$(JsonGetString <<<"${UPDATE}" '"result",0,"inline_query","query"')")" iQUERY[USER_ID]="$(JsonGetValue <<<"${UPDATE}" '"result",'"${num}"',"inline_query","from","id"')" iQUERY[FIRST_NAME]="$(JsonDecode "$(JsonGetString <<<"${UPDATE}" '"result",'"${num}"',"inline_query","from","first_name"')")" iQUERY[LAST_NAME]="$(JsonDecode "$(JsonGetString <<<"${UPDATE}" '"result",'"${num}"',"inline_query","from","last_name"')")" diff --git a/test/d-process_inline-test.sh b/test/d-process_inline-test.sh index 079c9c4..9d3f507 100755 --- a/test/d-process_inline-test.sh +++ b/test/d-process_inline-test.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ v0.70-5-g82eb3c7 +#### $$VERSION$$ v0.70-6-g5b8f2a2 # include common functions and definitions # shellcheck source=test/ALL-tests.inc.sh