connector: support messages sent by a channel

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
Co-authored-by: Tulir Asokan <tulir@maunium.net>
This commit is contained in:
Sumner Evans
2024-09-03 12:36:28 -06:00
parent 8925318ec4
commit 3b6af95976
5 changed files with 78 additions and 10 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ func APICallWithUpdates[U hasUpdates](ctx context.Context, t *TelegramClient, fn
for _, c := range resp.GetChats() {
if channel, ok := c.(*tg.Channel); ok {
if err := t.ScopedStore.SetAccessHash(ctx, channel.ID, channel.AccessHash); err != nil {
if err := t.updateChannel(ctx, channel); err != nil {
return *new(U), err
}
}