From 6f3fc1c4958dbd4a026c285de7354eeaa680198a Mon Sep 17 00:00:00 2001 From: vyneer Date: Tue, 2 Jul 2024 00:55:38 +0300 Subject: [PATCH] fix: ignore combos --- assets/chat/js/chat.js | 4 +++- assets/chat/js/messages/ChatEmoteMessage.js | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/chat/js/chat.js b/assets/chat/js/chat.js index 9988a1a3..e3cacec8 100644 --- a/assets/chat/js/chat.js +++ b/assets/chat/js/chat.js @@ -1129,7 +1129,9 @@ class Chat { if (isCombo && win.lastmessage?.type === MessageTypes.USER) { win.removeLastMessage(); - const msg = MessageBuilder.emote(textonly, data.timestamp, 2).into(this); + const msg = MessageBuilder.emote(textonly, usr, data.timestamp, 2).into( + this, + ); if (this.user.equalWatching(usr.watching)) { msg.ui.classList.add('watching-same'); diff --git a/assets/chat/js/messages/ChatEmoteMessage.js b/assets/chat/js/messages/ChatEmoteMessage.js index 38d5fc4a..e7debff7 100644 --- a/assets/chat/js/messages/ChatEmoteMessage.js +++ b/assets/chat/js/messages/ChatEmoteMessage.js @@ -27,8 +27,9 @@ function ChatEmoteMessageCount(message) { const ChatEmoteMessageCountThrottle = throttle(63, ChatEmoteMessageCount); export default class ChatEmoteMessage extends ChatMessage { - constructor(emote, timestamp, count = 1) { + constructor(emote, user, timestamp, count = 1) { super(emote, timestamp, MessageTypes.EMOTE); + this.user = user; this.emotecount = count; this.emoteFormatter = new EmoteFormatter(); }