client: make GetUserInfo work for channels

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-10-03 15:05:21 -06:00
parent d14f365fe1
commit 8480c8aa68
4 changed files with 57 additions and 19 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ func handleUserUpdates[U hasUserUpdates](ctx context.Context, t *TelegramClient,
func handleChatUpdates[U hasChatUpdates](ctx context.Context, t *TelegramClient, resp hasChatUpdates) error {
for _, c := range resp.GetChats() {
if channel, ok := c.(*tg.Channel); ok {
if err := t.updateChannel(ctx, channel); err != nil {
if _, err := t.updateChannel(ctx, channel); err != nil {
return err
}
}