From 9706deb27dfb1ced1e449c5cc4b848261961ad0d Mon Sep 17 00:00:00 2001 From: Adam Van Ymeren Date: Fri, 12 Sep 2025 09:22:43 -0700 Subject: [PATCH] media: always give the unsupported notice if we don't yet handle the type --- pkg/connector/tomatrix.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/connector/tomatrix.go b/pkg/connector/tomatrix.go index adf013b5..437fced9 100644 --- a/pkg/connector/tomatrix.go +++ b/pkg/connector/tomatrix.go @@ -105,7 +105,7 @@ func (c *TelegramClient) mediaToMatrix(ctx context.Context, portal *bridgev2.Por return convertDice(media), nil, nil, nil case tg.MessageMediaGameTypeID: return convertGame(media), nil, nil, nil - case tg.MessageMediaStoryTypeID, tg.MessageMediaInvoiceTypeID, tg.MessageMediaGiveawayTypeID, tg.MessageMediaGiveawayResultsTypeID, tg.MessageMediaPaidMediaTypeID: + default: // TODO: support these properly return &bridgev2.ConvertedMessagePart{ Type: event.EventMessage, @@ -118,8 +118,6 @@ func (c *TelegramClient) mediaToMatrix(ctx context.Context, portal *bridgev2.Por "fi.mau.telegram.type_id": media.TypeID(), }, }, nil, nil, nil - default: - return nil, nil, nil, fmt.Errorf("unsupported media type %T", media) } }