Skip to content

Commit 157ecb4

Browse files
committed
Moderation: Default to always hiding text for mutes
Officer Jenny had a command to always hidetext after a user's mutes, which was a common request to be ported. There's no real reason it can't just always hide text instead, saves time and complexity.
1 parent f643969 commit 157ecb4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

server/chat-commands/moderation.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,11 @@ export const commands: Chat.ChatCommands = {
698698
const displayMessage = `${targetUser.name}'s ac account: ${targetUser.autoconfirmed}`;
699699
this.privateModAction(displayMessage);
700700
}
701-
const userid = targetUser.getLastId();
702-
this.add(`|hidelines|unlink|${userid}`);
703-
if (userid !== toID(inputUsername)) this.add(`|hidelines|unlink|${toID(inputUsername)}`);
701+
const ids = [targetUser.getLastId()];
702+
if (ids[0] !== toID(inputUsername)) {
703+
ids.push(toID(inputUsername));
704+
}
705+
room.hideText(ids);
704706

705707
room.mute(targetUser, muteDuration);
706708
},

0 commit comments

Comments
 (0)