exclude user / instance mandatoryCW when bypassSilence is set

This commit is contained in:
Hazelnoot 2025-08-09 13:40:56 -04:00
parent 7728e749f1
commit 21f3834729

View file

@ -120,10 +120,13 @@ function getMutes(note: Misskey.entities.Note, withHardMute: boolean, overrides:
: (isMe ? null : note.mandatoryCW);
const userMandatoryCW = override.userMandatoryCW !== undefined
? override.userMandatoryCW
: (isMe ? null : note.user.mandatoryCW);
: !note.user.bypassSilence
? note.user.mandatoryCW
: null;
const instanceMandatoryCW = override.instanceMandatoryCW !== undefined
? override.instanceMandatoryCW
: (!isMe && note.user.instance)
: (!note.user.bypassSilence && note.user.instance)
? note.user.instance.mandatoryCW
: null;