Skip to content

Commit

Permalink
fix: ignore combos (#495)
Browse files Browse the repository at this point in the history
* fix: ignore combos

* Revert "fix: ignore combos"

This reverts commit 6f3fc1c.

* fix: better ignore combos fix
  • Loading branch information
vyneer authored Jul 23, 2024
1 parent 24c9856 commit 89f57dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/chat/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ class Chat {
win.addMessage(this, message);

// Hide the message if the user is ignored
if (message.user && this.ignored(message.user.username, message.message)) {
if (this.ignored(message.user?.username, message.message)) {
message.ignore();
}

Expand Down
13 changes: 10 additions & 3 deletions assets/chat/js/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,18 @@ class ChatWindow extends EventEmitter {
message.updateTimeFormat();
}

if (message.user && !message.user.isSystem()) {
const { username } = message.user;
if (message.user?.isSystem()) {
return;
}

message.setOwnMessage(username === chat.user.username);
const username = message.user?.username;

if (message.type !== MessageTypes.UI) {
message.ignore(chat.ignored(username, message.message));
}

if (username) {
message.setOwnMessage(username === chat.user.username);
message.highlight(chat.shouldHighlightMessage(message));
if (message.type === MessageTypes.USER) {
message.setContinued(this.isContinued(message, this.messages[i - 1]));
Expand Down

0 comments on commit 89f57dc

Please sign in to comment.