media: always give the unsupported notice if we don't yet handle the type
This commit is contained in:
@@ -105,7 +105,7 @@ func (c *TelegramClient) mediaToMatrix(ctx context.Context, portal *bridgev2.Por
|
|||||||
return convertDice(media), nil, nil, nil
|
return convertDice(media), nil, nil, nil
|
||||||
case tg.MessageMediaGameTypeID:
|
case tg.MessageMediaGameTypeID:
|
||||||
return convertGame(media), nil, nil, nil
|
return convertGame(media), nil, nil, nil
|
||||||
case tg.MessageMediaStoryTypeID, tg.MessageMediaInvoiceTypeID, tg.MessageMediaGiveawayTypeID, tg.MessageMediaGiveawayResultsTypeID, tg.MessageMediaPaidMediaTypeID:
|
default:
|
||||||
// TODO: support these properly
|
// TODO: support these properly
|
||||||
return &bridgev2.ConvertedMessagePart{
|
return &bridgev2.ConvertedMessagePart{
|
||||||
Type: event.EventMessage,
|
Type: event.EventMessage,
|
||||||
@@ -118,8 +118,6 @@ func (c *TelegramClient) mediaToMatrix(ctx context.Context, portal *bridgev2.Por
|
|||||||
"fi.mau.telegram.type_id": media.TypeID(),
|
"fi.mau.telegram.type_id": media.TypeID(),
|
||||||
},
|
},
|
||||||
}, nil, nil, nil
|
}, nil, nil, nil
|
||||||
default:
|
|
||||||
return nil, nil, nil, fmt.Errorf("unsupported media type %T", media)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user