fix Fanout ignoreAuthorFromUserSuspension option not working after relation changes
This commit is contained in:
parent
f0b1809598
commit
9dad384f81
1 changed files with 2 additions and 6 deletions
|
|
@ -146,15 +146,11 @@ export class FanoutTimelineEndpointService {
|
||||||
{
|
{
|
||||||
const parentFilter = filter;
|
const parentFilter = filter;
|
||||||
filter = (note) => {
|
filter = (note) => {
|
||||||
const noteJoined = note as MiNote & {
|
|
||||||
renoteUser: MiUser | null;
|
|
||||||
replyUser: MiUser | null;
|
|
||||||
};
|
|
||||||
if (!ps.ignoreAuthorFromUserSuspension) {
|
if (!ps.ignoreAuthorFromUserSuspension) {
|
||||||
if (note.user?.isSuspended) return false;
|
if (note.user?.isSuspended) return false;
|
||||||
}
|
}
|
||||||
if (note.userId !== note.renoteUserId && noteJoined.renoteUser?.isSuspended) return false;
|
if (note.userId !== note.renoteUserId && note.renote?.user?.isSuspended) return false;
|
||||||
if (note.userId !== note.replyUserId && noteJoined.replyUser?.isSuspended) return false;
|
if (note.userId !== note.replyUserId && note.reply?.user?.isSuspended) return false;
|
||||||
|
|
||||||
return parentFilter(note);
|
return parentFilter(note);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue