gotd/updates: stop listening to channel on ChannelForbidden/Invalid

This commit is contained in:
Tulir Asokan
2025-12-10 19:12:34 +02:00
parent 7f13284b59
commit 0e3b1b63a9
3 changed files with 60 additions and 17 deletions
+3
View File
@@ -106,6 +106,9 @@ func (m *Manager) Run(ctx context.Context, api API, userID int64, opt AuthOption
AccessHash int64
})
if err := m.cfg.Storage.ForEachChannels(ctx, userID, func(ctx context.Context, channelID int64, pts int) error {
if pts == -1 {
return nil
}
hash, found, err := m.cfg.AccessHasher.GetChannelAccessHash(ctx, userID, channelID)
if err != nil {
return errors.Wrap(err, "get channel access hash")