v0.97.0
Yes
I'm using updatesRecovery:
d := tg.NewUpdateDispatcher()
updateHandler := storage.UpdateHook(d, peerDB)
...
updatesRecovery := updates.New(updates.Config{
Handler: updateHandler, // using previous handler with peerDB
Logger: log.Named("updates.recovery"),
Storage: boltstor.NewStateStorage(boltdb),
})
...
... client.Run code
return updatesRecovery.Run(ctx, api, self.ID, updates.AuthOptions{
IsBot: self.Bot,
OnStart: func(ctx context.Context) {
fmt.Println("Update recovery initialized and started, listening for events")
},
})
When I join to channel which after some time is changed to PRIVATE (or deleted idk), I can see then repeated errors:
updates/state_channel.go:336 get channel difference error {"channel_id": 1234, "error": "get channel difference: rpcDoRequest: rpc error code 400: CHANNEL_PRIVATE", "errorVerbose": "get channel difference:\n github.com/gotd/td/telegram/updates.(*channelState).getDifference\n /go/pkg/mod/github.com/gotd/[email protected]/telegram/updates/state_channel.go:253\n - rpcDoRequest:\n github.com/gotd/td/internal/mtproto.(*Conn).Invoke\n /go/pkg/mod/github.com/gotd/[email protected]/internal/mtproto/rpc.go:44\n - rpc error code 400: CHANNEL_PRIVATE"}
And this error appears every timer tick of channel state updater.
I think there should be some configuration to set, if updater fails to get updates for channel for X minutes or after X calls of seeing the same error it should stop watching the channel instead of making calls every time to TG api and receiving errors.
Updater tries to get channel updates anyway
go1.21.5
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too