Fix bot_started chat_id
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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) -----
|
||||||
|
|||||||
Reference in New Issue
Block a user