handletelegram,gotd: stop get difference polling after leaving channel

This commit is contained in:
Tulir Asokan
2025-12-11 13:56:48 +02:00
parent 390f9f422e
commit 581ba79c84
3 changed files with 31 additions and 7 deletions
+7
View File
@@ -161,6 +161,13 @@ func (m *Manager) Run(ctx context.Context, api API, userID int64, opt AuthOption
return wg.Wait()
}
func (m *Manager) RemoveChannel(channelID int64, reason error) {
if m == nil {
return
}
m.state.RemoveChannel(channelID, reason)
}
func (m *Manager) loadState(ctx context.Context, api API, userID int64, forget bool) (State, error) {
onNotFound:
var state State