mirror of
https://github.com/anten-ka/go_warp_pro.git
synced 2026-05-19 14:26:00 +00:00
Fix bot daemon: revert herestring to echo|jq (herestring unreliable in systemd context)
Made-with: Cursor
This commit is contained in:
6
warp.sh
6
warp.sh
@@ -1622,14 +1622,14 @@ bot_poll_cycle() {
|
||||
[ -z "$response" ] && sleep 2 && return
|
||||
|
||||
local header
|
||||
header=$(jq -r '[.ok // "false", (.result | length)] | @tsv' <<< "$response" 2>/dev/null)
|
||||
header=$(echo "$response" | jq -r '[.ok // "false", (.result | length)] | @tsv' 2>/dev/null)
|
||||
local ok cnt
|
||||
IFS=$'\t' read -r ok cnt <<< "$header"
|
||||
[ "$ok" != "true" ] && sleep 5 && return
|
||||
[ "$cnt" -eq 0 ] 2>/dev/null && return
|
||||
|
||||
local updates_tsv
|
||||
updates_tsv=$(jq -r '
|
||||
updates_tsv=$(echo "$response" | jq -r '
|
||||
.result[] | [
|
||||
.update_id,
|
||||
(.callback_query.data // ""),
|
||||
@@ -1639,7 +1639,7 @@ bot_poll_cycle() {
|
||||
(.message.chat.id // ""),
|
||||
(.message.text // "")
|
||||
] | @tsv
|
||||
' <<< "$response" 2>/dev/null)
|
||||
' 2>/dev/null)
|
||||
|
||||
while IFS=$'\t' read -r uid cbd cbi cci cmi mci mtx; do
|
||||
[ -z "$uid" ] && continue
|
||||
|
||||
Reference in New Issue
Block a user