Preact: Skip notifications for ignored users (#2584)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run

This commit is contained in:
Aurastic 2026-03-15 16:59:04 +05:30 committed by GitHub
parent ebe6dee892
commit ff58221d7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -147,7 +147,8 @@ export class ChatRoom extends PSRoom {
if (toID(fromUser) === PS.user.userid) break;
const message = args[args[0] === 'c:' ? 3 : 2];
const noNotify = this.log?.parseChatMessage(message, name, args[1])?.[2];
if (!noNotify) {
const isIgnored = PS.prefs.ignore?.[toID(fromUser)];
if (!noNotify && !isIgnored) {
let textContent = message;
if (/^\/(log|raw|html|uhtml|uhtmlchange) /.test(message)) {
textContent = message.split(' ').slice(1).join(' ')