diff --git a/backend/python/app/api/im_bot_user.py b/backend/python/app/api/im_bot_user.py index bdd2281..a0dff98 100644 --- a/backend/python/app/api/im_bot_user.py +++ b/backend/python/app/api/im_bot_user.py @@ -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 = {}