@@ -246,6 +246,7 @@ class FirebotChatHelpers {
246246 const sharedChatRoom = SharedChatCache . participants [ sharedChatRoomId ] ;
247247 const isSharedChatMessage = sharedChatRoomId != null && sharedChatRoomId !== AccountAccess . getAccounts ( ) . streamer . userId ;
248248 const isGigantified = msg . tags . get ( "msg-id" ) === "gigantified-emote-message" ;
249+ const isGif = msg . tags . has ( "gifs" ) && ! ! msg . tags . get ( "gifs" ) ?. length ;
249250 const firebotChatMessage : FirebotChatMessage = {
250251 id : msg . tags . get ( "id" ) ,
251252 username : msg . userInfo . userName ,
@@ -258,6 +259,7 @@ class FirebotChatHelpers {
258259 isHiddenFromChatFeed : false ,
259260 isReply : msg . tags . has ( "reply-parent-msg-id" ) ,
260261 isGigantified : isGigantified ,
262+ isGif : isGif ,
261263 replyParentMessageId : msg . tags . get ( "reply-parent-msg-id" ) ,
262264 replyParentMessageText : msg . tags . get ( "reply-parent-msg-body" ) ,
263265 replyParentMessageSenderUserId : msg . tags . get ( "reply-parent-user-id" ) ,
@@ -310,8 +312,10 @@ class FirebotChatHelpers {
310312 msg . _params [ 1 ] . value = msgText ;
311313 }
312314
313- const messageParts = this . _parseMessageParts ( firebotChatMessage ,
314- parseChatMessage ( msgText , msg . emoteOffsets , TwitchEventSubChatHelpers . twitchCheermotes ?. getPossibleNames ( ) ) ) ;
315+ const messageParts = firebotChatMessage . isGif === true
316+ ? [ { type : "gif" , text : msgText , url : msg . tags . get ( "gifs" ) . split ( "|" ) [ 2 ] } as FirebotParsedMessagePart ]
317+ : this . _parseMessageParts ( firebotChatMessage ,
318+ parseChatMessage ( msgText , msg . emoteOffsets , TwitchEventSubChatHelpers . twitchCheermotes ?. getPossibleNames ( ) ) ) ;
315319
316320 firebotChatMessage . parts = messageParts ;
317321
0 commit comments