Skip to content

Commit 05f44e9

Browse files
committed
handlematrix: Fix M->T GIF sending
1 parent 45136b4 commit 05f44e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/connector/handlematrix.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ func (tc *TwitterClient) HandleMatrixMessage(ctx context.Context, msg *bridgev2.
5555
MediaType: MSG_TYPE_TO_MEDIA_TYPE[content.MsgType],
5656
MediaCategory: MSG_TYPE_TO_MEDIA_CATEGORY[content.MsgType],
5757
}
58+
if content.Info.MimeType == "image/gif" {
59+
uploadMediaParams.MediaType = "image/gif"
60+
uploadMediaParams.MediaCategory = "dm_gif"
61+
}
5862
uploadedMediaResponse, err := tc.client.UploadMedia(uploadMediaParams, data)
5963
if err != nil {
6064
return nil, err

0 commit comments

Comments
 (0)