re-add ignoreAuthor
Some checks failed
Lint / pnpm_install (pull_request) Successful in 32s
Test (production install and build) / production (22.x) (pull_request) Successful in 1m15s
Test (frontend) / vitest (22.x) (pull_request) Successful in 1m25s
Lint / lint (backend) (pull_request) Successful in 1m5s
Test (backend) / validate-api-json (22.x) (pull_request) Successful in 1m41s
Lint / lint (misskey-js) (pull_request) Successful in 34s
Lint / lint (sw) (pull_request) Successful in 33s
Test (backend) / unit (22.x) (pull_request) Successful in 2m33s
Lint / typecheck (misskey-js) (pull_request) Successful in 33s
Lint / typecheck (backend) (pull_request) Successful in 1m26s
Test (backend) / e2e (22.x) (pull_request) Failing after 6m22s
Lint / lint (frontend) (pull_request) Successful in 7m28s
Some checks failed
Lint / pnpm_install (pull_request) Successful in 32s
Test (production install and build) / production (22.x) (pull_request) Successful in 1m15s
Test (frontend) / vitest (22.x) (pull_request) Successful in 1m25s
Lint / lint (backend) (pull_request) Successful in 1m5s
Test (backend) / validate-api-json (22.x) (pull_request) Successful in 1m41s
Lint / lint (misskey-js) (pull_request) Successful in 34s
Lint / lint (sw) (pull_request) Successful in 33s
Test (backend) / unit (22.x) (pull_request) Successful in 2m33s
Lint / typecheck (misskey-js) (pull_request) Successful in 33s
Lint / typecheck (backend) (pull_request) Successful in 1m26s
Test (backend) / e2e (22.x) (pull_request) Failing after 6m22s
Lint / lint (frontend) (pull_request) Successful in 7m28s
This commit is contained in:
parent
80d1cc174c
commit
b597eb4c04
1 changed files with 2 additions and 2 deletions
|
@ -4,8 +4,8 @@
|
|||
*/
|
||||
|
||||
//Cherrypicked mute fix from foundkey: https://akkoma.dev/FoundKeyGang/FoundKey/pulls/32
|
||||
export function isUserRelated(note: any, ids: Set<string>): boolean {
|
||||
if (ids.has(note.userId)) return true; // note author is muted
|
||||
export function isUserRelated(note: any, ids: Set<string>, ignoreAuthor = false): boolean {
|
||||
if (ids.has(note.userId) && !ignoreAuthor) return true; // note author is muted (unless ignoreAuthor is false)
|
||||
if (note.mentions && note.mentions.some((user: string) => ids.has(user))) return true; // any of mentioned users are muted
|
||||
if (note.reply && isUserRelated(note.reply, ids)) return true; // also check reply target
|
||||
if (note.renote && isUserRelated(note.renote, ids)) return true; // also check renote target
|
||||
|
|
Loading…
Reference in a new issue