()
| 586 | function getGroupKey(message: any): string | null { |
| 587 | const gid = (message as any).groupedId; |
| 588 | const sid = getChatIdFromMessage(message); |
| 589 | if (!gid || !sid) return null; |
| 590 | const gidStr = |
| 591 | typeof gid?.toString === "function" ? gid.toString() : String(gid); |
| 592 | return `${sid}:${gidStr}`; |
| 593 | } |
| 594 | |
| 595 | async function forwardGroupMessages( |
| 596 | client: TelegramClient, |
| 597 | fromChatId: number, |
| 598 | toChatId: number, |
| 599 | messageIds: number[], |
| 600 | options?: { silent?: boolean; replyTo?: number } |