Handle gif stickers

This commit is contained in:
Tulir Asokan
2023-02-26 20:44:35 +02:00
parent ac7ad471a5
commit cace8b5939
3 changed files with 7 additions and 3 deletions

View File

@@ -632,6 +632,10 @@ func (portal *Portal) handleDiscordSticker(intent *appservice.IntentAPI, sticker
mime = "image/apng"
case discordgo.StickerFormatTypeLottie:
mime = "application/json"
case discordgo.StickerFormatTypeGIF:
mime = "image/gif"
default:
portal.log.Warnfln("Unknown sticker format %d in %s", sticker.FormatType, sticker.ID)
}
content := &event.MessageEventContent{
Body: sticker.Name, // TODO find description from somewhere?