power levels: prevent sending to blocked users

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-10-09 09:57:02 -06:00
parent c75ac58763
commit 03c7028460
4 changed files with 52 additions and 0 deletions
+3
View File
@@ -189,6 +189,9 @@ func NewTelegramClient(ctx context.Context, tc *TelegramConnector, login *bridge
dispatcher.OnChatDefaultBannedRights(func(ctx context.Context, e tg.Entities, update *tg.UpdateChatDefaultBannedRights) error {
return client.onChatDefaultBannedRights(ctx, e, update)
})
dispatcher.OnPeerBlocked(func(ctx context.Context, e tg.Entities, update *tg.UpdatePeerBlocked) error {
return client.onPeerBlocked(ctx, update)
})
client.ScopedStore = tc.Store.GetScopedStore(telegramUserID)