对齐openclaw: payload补client_id(随机uuid去重)+run_id+from_user_id。缺失client_id导致多轮对话第二轮消息被iLink误判重复丢弃(第一轮成功第二轮失败)。
This commit is contained in:
1 parent
51d8df6e6a
commit
1c0dc59842
1 file changed
+4
@@ -18,6 +18,7 @@ import os
|
||||
import random
|
||||
import threading
|
||||
import time
|
||||
import uuid
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from typing import Optional
|
||||
from urllib.parse import quote as _quote
|
||||
@@ -208,11 +209,14 @@ def _wechat_post_msg(baseurl: str, bot_token: str, to_user_id: str, context_toke
|
||||
ret=-14=会话过期需重扫;ret=-2=token 失效。"""
|
||||
payload = {
|
||||
"msg": {
|
||||
"from_user_id": "",
|
||||
"to_user_id": to_user_id,
|
||||
"client_id": uuid.uuid4().hex,
|
||||
"message_type": 2,
|
||||
"message_state": 2,
|
||||
"context_token": context_token,
|
||||
"item_list": item_list,
|
||||
"run_id": uuid.uuid4().hex,
|
||||
}
|
||||
}
|
||||
last_body = {}
|
||||
|
||||
Reference in new issue
Block a user