gotd: add extra cache for left channels

This commit is contained in:
Tulir Asokan
2025-12-12 16:15:49 +02:00
parent cd9970055f
commit 095bd65d51
2 changed files with 16 additions and 4 deletions
+3 -1
View File
@@ -51,9 +51,11 @@ func (s *internalState) applyCombined(ctx context.Context, comb *tg.UpdatesCombi
ptsChanged = true
continue
case *tg.UpdateChannelTooLong:
s.channelsLock.Lock()
st, ok := s.channels[u.ChannelID]
s.channelsLock.Unlock()
if !ok {
s.log.Debug("ChannelTooLong for channel that is not in the internalState, update ignored", zap.Int64("channel_id", u.ChannelID))
s.log.Info("ChannelTooLong for channel that is not in the internalState, update ignored", zap.Int64("channel_id", u.ChannelID))
continue
}
if err := st.Push(ctx, channelUpdate{