viettranx
473679d28d
fix(telegram): handle group-to-supergroup migration seamlessly
...
When a Telegram group upgrades to a supergroup, the chat ID changes and
all existing references become stale. This caused send failures (400),
orphaned sessions, and required manual re-pairing.
Add dual-path migration handling:
- Proactive: intercept inbound MigrateToChatID before isServiceMessage
- Reactive: detect 400 + MigrateToChatID on send, migrate DB, retry
DB migration updates in a single transaction (scoped by tenant + channel):
- paired_devices: sender_id, chat_id
- sessions: session_key, user_id
- channel_contacts: sender_id
- channel_pending_messages: history_key
Also invalidates in-memory caches (approvedGroups, pairingReplySent,
groupHistory) and handles media sends via migration retry in Send().
2026-04-05 13:12:33 +07:00
..
2026-03-23 22:57:26 +07:00
2026-03-27 10:19:16 +07:00
2026-03-27 10:19:16 +07:00
2026-03-27 09:35:57 +07:00
2026-03-27 10:19:16 +07:00
2026-03-29 18:01:08 +07:00
2026-03-29 22:33:17 +07:00
2026-03-29 18:01:08 +07:00
2026-03-29 18:01:08 +07:00
2026-03-29 22:33:17 +07:00
2026-03-14 18:13:52 +07:00
2026-03-27 20:15:26 +07:00
2026-03-29 18:01:08 +07:00
2026-03-30 20:56:49 +07:00
2026-03-27 09:35:57 +07:00
2026-03-23 08:08:23 +07:00
2026-03-27 20:15:26 +07:00
2026-03-23 08:08:23 +07:00
2026-04-05 13:12:33 +07:00
2026-04-02 18:58:24 +07:00
2026-03-29 09:02:48 +07:00
2026-04-01 13:59:56 +07:00
2026-03-24 22:15:16 +07:00
2026-04-01 19:31:02 +07:00
2026-04-05 08:47:10 +07:00
2026-03-29 23:51:53 +07:00
2026-03-27 09:28:42 +07:00
2026-03-28 13:33:25 +07:00
2026-04-02 18:58:24 +07:00
2026-03-27 13:07:14 +07:00
2026-04-03 16:45:00 +07:00
2026-04-02 14:58:03 +07:00
2026-03-29 18:01:08 +07:00
2026-03-14 18:13:52 +07:00
2026-03-29 18:01:08 +07:00
2026-03-14 18:13:52 +07:00
2026-03-14 18:13:52 +07:00
2026-03-23 22:57:39 +07:00
2026-03-29 18:01:08 +07:00
2026-03-29 12:54:12 +07:00
2026-03-23 22:57:26 +07:00
2026-03-30 14:12:08 +07:00
2026-03-23 22:57:26 +07:00
2026-03-27 09:35:57 +07:00
2026-03-27 10:19:16 +07:00
2026-03-27 09:35:57 +07:00
2026-03-27 10:19:16 +07:00
2026-03-31 07:56:01 +07:00
2026-03-23 22:57:26 +07:00
2026-03-23 22:57:26 +07:00
2026-03-23 22:57:26 +07:00
2026-03-27 09:35:57 +07:00
2026-03-30 21:36:09 +07:00
2026-03-30 21:36:09 +07:00
2026-04-03 15:18:54 +07:00
2026-04-03 15:18:54 +07:00
2026-04-03 15:17:08 +07:00
2026-04-03 15:18:54 +07:00
2026-03-25 14:50:43 +07:00
2026-03-31 14:35:57 +07:00
2026-03-29 12:46:23 +07:00
2026-04-03 15:44:39 +07:00
2026-03-30 21:36:09 +07:00
2026-04-04 07:06:34 +07:00
2026-03-27 20:15:26 +07:00
2026-03-24 22:15:16 +07:00
2026-04-04 13:18:57 +07:00
2026-04-02 11:59:49 +07:00
2026-04-04 13:18:57 +07:00
2026-03-29 18:01:08 +07:00
2026-03-23 22:57:26 +07:00
2026-03-29 22:33:17 +07:00
2026-03-30 21:58:29 +07:00
2026-03-30 21:58:29 +07:00
2026-03-23 22:06:39 +07:00
2026-04-02 11:42:14 +07:00
2026-03-29 22:33:17 +07:00
2026-04-02 19:05:46 +07:00
2026-04-02 19:05:46 +07:00
2026-03-09 10:41:54 +07:00
2026-04-02 11:04:56 +07:00
2026-03-23 10:17:47 +07:00
2026-03-27 09:35:57 +07:00
2026-04-02 11:04:56 +07:00
2026-03-24 16:01:02 +07:00
2026-03-23 22:57:26 +07:00
2026-03-23 22:57:26 +07:00
2026-03-29 22:33:17 +07:00
2026-03-29 22:33:17 +07:00
2026-03-25 10:21:39 +07:00
2026-03-23 08:08:23 +07:00
2026-03-24 20:40:59 +07:00
2026-03-24 22:15:16 +07:00
2026-03-23 22:57:26 +07:00
2026-03-24 20:40:59 +07:00
2026-03-29 22:33:17 +07:00
2026-03-30 14:12:18 +07:00
2026-03-30 14:12:18 +07:00
2026-03-24 22:15:16 +07:00
2026-03-25 22:17:33 +07:00