fixed getreplytext getting the wrong text

This commit is contained in:
celso 2024-07-26 09:03:26 -03:00
parent e643e39a03
commit 7610913f38
1 changed files with 2 additions and 1 deletions

View File

@ -140,7 +140,8 @@ getreplyusrname(){
}
getreplytext() {
grep "reply_to_message" "${bot_tmpdir}${1}" >/dev/null && local replytext="$(tail -n 1 "${bot_tmpdir}${1}" | grep -om1\
tail -n1 "${bot_tmpdir}${1}" | grep "reply_to_message" >/dev/null || return 1
local replytext="$(tail -n 1 "${bot_tmpdir}${1}" | grep -om1\
'{\?\("text"\|"caption"\):"\(\\"\|[^"]*\)*"\(,\|}\)' | grep -v "^{" | head -n1)"
grep "^\"text\"" <<< "${replytext}" >/dev/null && utf-16-surrogate-pair-decode "${replytext:8:-2}"\
|| {