Fix bot_started chat_id

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
root
2026-02-20 12:24:58 +03:00
parent 6b430ba992
commit 859377c970

View File

@@ -59,7 +59,14 @@ const callbackUser = raw?.callback?.user;
const userId = callbackUser?.user_id ?? callbackUser?.id ?? sender?.user_id ?? sender?.id ?? raw?.user_id ?? msg?.sender?.user_id; const userId = callbackUser?.user_id ?? callbackUser?.id ?? sender?.user_id ?? sender?.id ?? raw?.user_id ?? msg?.sender?.user_id;
result.max_id = userId; result.max_id = userId;
const chatId = msg?.recipient?.chat_id ?? msg?.recipient?.user_id ?? recipient?.chat_id ?? recipient?.user_id ?? userId; const chatId =
msg?.recipient?.chat_id ??
msg?.recipient?.user_id ??
msg?.chat_id ??
recipient?.chat_id ??
recipient?.user_id ??
raw?.chat_id ??
userId;
result.max_chat_id = chatId; result.max_chat_id = chatId;
// ----- 2) Ответ на сообщение / пересланное (message.link = LinkedMessage) ----- // ----- 2) Ответ на сообщение / пересланное (message.link = LinkedMessage) -----