fix: accept Discord smoke nonce directly · openclaw/openclaw@7f64a3c
steipete
·
2026-04-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1625,15 +1625,15 @@ wait_for_discord_host_visibility() {
|
1625 | 1625 | if [[ -n "$message_id" ]]; then |
1626 | 1626 | response="$(discord_api_request GET "/channels/$DISCORD_CHANNEL_ID/messages/$message_id")" |
1627 | 1627 | local direct_rc=$? |
1628 | | -if [[ $direct_rc -eq 0 ]] && [[ -n "$response" ]] && printf '%s' "$response" | json_contains_string "$nonce"; then |
| 1628 | +if [[ $direct_rc -eq 0 ]] && [[ -n "$response" ]] && { [[ "$response" == *"$nonce"* ]] || printf '%s' "$response" | json_contains_string "$nonce"; }; then |
1629 | 1629 | set -e |
1630 | 1630 | return 0 |
1631 | 1631 | fi |
1632 | 1632 | fi |
1633 | 1633 | response="$(discord_api_request GET "/channels/$DISCORD_CHANNEL_ID/messages?limit=20")" |
1634 | 1634 | local rc=$? |
1635 | 1635 | set -e |
1636 | | -if [[ $rc -eq 0 ]] && [[ -n "$response" ]] && printf '%s' "$response" | json_contains_string "$nonce"; then |
| 1636 | +if [[ $rc -eq 0 ]] && [[ -n "$response" ]] && { [[ "$response" == *"$nonce"* ]] || printf '%s' "$response" | json_contains_string "$nonce"; }; then |
1637 | 1637 | return 0 |
1638 | 1638 | fi |
1639 | 1639 | sleep 2 |
@@ -1696,7 +1696,7 @@ wait_for_guest_discord_readback() {
|
1696 | 1696 | if [[ -n "$response" ]]; then |
1697 | 1697 | printf '%s' "$response" >"$last_response_path" |
1698 | 1698 | fi |
1699 | | -if [[ $rc -eq 0 ]] && [[ -n "$response" ]] && printf '%s' "$response" | json_contains_string "$nonce"; then |
| 1699 | +if [[ $rc -eq 0 ]] && [[ -n "$response" ]] && { [[ "$response" == *"$nonce"* ]] || printf '%s' "$response" | json_contains_string "$nonce"; }; then |
1700 | 1700 | return 0 |
1701 | 1701 | fi |
1702 | 1702 | sleep 3 |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。