From 42465f1aca3a5b91d0b86dac5ca2e9abccdc493f Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 3 Mar 2026 18:07:00 +0200 Subject: [PATCH] handlematrix: add todo for avatar handling --- pkg/connector/handlematrix.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index 9ab229ce..fd7521f6 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -1025,10 +1025,10 @@ func (t *TelegramClient) HandleMatrixRoomAvatar(ctx context.Context, msg *bridge } var photo tg.InputChatPhotoClass - if msg.Content.URL == "" && msg.Content.MSC3414File == nil { + if msg.Content.URL == "" { photo = &tg.InputChatPhotoEmpty{} } else { - data, err := t.main.Bridge.Bot.DownloadMedia(ctx, msg.Content.URL, msg.Content.MSC3414File) + data, err := t.main.Bridge.Bot.DownloadMedia(ctx, msg.Content.URL, nil) if err != nil { return false, fmt.Errorf("failed to download avatar: %w", err) } @@ -1048,6 +1048,7 @@ func (t *TelegramClient) HandleMatrixRoomAvatar(ctx context.Context, msg *bridge if err != nil { return false, err } + // TODO update portal metadata return true, nil case ids.PeerTypeChannel: accessHash, err := t.ScopedStore.GetAccessHash(ctx, peerType, id) @@ -1064,6 +1065,7 @@ func (t *TelegramClient) HandleMatrixRoomAvatar(ctx context.Context, msg *bridge if err != nil { return false, err } + // TODO update portal metadata return true, nil default: return false, fmt.Errorf("unsupported peer type %s for changing room avatar", peerType)