Commit 311ad68
committed
fix(telegram): expand BOT_NOT_MEMBER_RE regex to match all chat types
Addresses review comment on PR #48296
The previous regex only matched 'channel chat' errors, but Telegram API
returns different messages for different chat types:
- Channels: 'bot is not a member of the channel chat'
- Supergroups: 'bot is not a member of the supergroup chat'
- Groups: 'bot is not a member of the group chat' or 'bot was kicked from the group chat'
Updated regex to match all variants:
/403:\s*Forbidden:\s*bot (?:is not a member|was kicked from the)/i
This ensures consistent error handling across all chat types.1 parent 2e47f9b commit 311ad68
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
0 commit comments