diff --git a/go.mod b/go.mod index 8a6ca57..2c1f9dc 100644 --- a/go.mod +++ b/go.mod @@ -34,4 +34,4 @@ require ( maunium.net/go/mauflag v1.0.0 // indirect ) -replace github.com/bwmarrin/discordgo => github.com/beeper/discordgo v0.0.0-20230223130830-7848603fe535 +replace github.com/bwmarrin/discordgo => github.com/beeper/discordgo v0.0.0-20230226184350-ef6bcfe94f07 diff --git a/go.sum b/go.sum index 2f9bd2f..f210d2f 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= -github.com/beeper/discordgo v0.0.0-20230223130830-7848603fe535 h1:xBf8EQ7gMd01Gk9/e5dSrVyJsVkYgqk0Bih5RcRKCUs= -github.com/beeper/discordgo v0.0.0-20230223130830-7848603fe535/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY= +github.com/beeper/discordgo v0.0.0-20230226184350-ef6bcfe94f07 h1:YajAt8iJkBn4aavUuftybeXUaeN4p0DPCE3a4wxE2Oc= +github.com/beeper/discordgo v0.0.0-20230226184350-ef6bcfe94f07/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/portal.go b/portal.go index a7b4762..772906b 100644 --- a/portal.go +++ b/portal.go @@ -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?