summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/FanoutTimelineEndpointService.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/core/FanoutTimelineEndpointService.ts')
-rw-r--r--packages/backend/src/core/FanoutTimelineEndpointService.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/backend/src/core/FanoutTimelineEndpointService.ts b/packages/backend/src/core/FanoutTimelineEndpointService.ts
index af2723e99d..f9cf41e854 100644
--- a/packages/backend/src/core/FanoutTimelineEndpointService.ts
+++ b/packages/backend/src/core/FanoutTimelineEndpointService.ts
@@ -136,10 +136,10 @@ export class FanoutTimelineEndpointService {
const parentFilter = filter;
filter = (note) => {
if (!ps.ignoreAuthorFromInstanceBlock) {
- if (this.utilityService.isBlockedHost(this.meta.blockedHosts, note.userHost)) return false;
+ if (note.userInstance?.isBlocked) return false;
}
- if (note.userId !== note.renoteUserId && this.utilityService.isBlockedHost(this.meta.blockedHosts, note.renoteUserHost)) return false;
- if (note.userId !== note.replyUserId && this.utilityService.isBlockedHost(this.meta.blockedHosts, note.replyUserHost)) return false;
+ if (note.userId !== note.renoteUserId && note.renoteUserInstance?.isBlocked) return false;
+ if (note.userId !== note.replyUserId && note.replyUserInstance?.isBlocked) return false;
return parentFilter(note);
};
@@ -194,7 +194,10 @@ export class FanoutTimelineEndpointService {
.leftJoinAndSelect('note.renote', 'renote')
.leftJoinAndSelect('reply.user', 'replyUser')
.leftJoinAndSelect('renote.user', 'renoteUser')
- .leftJoinAndSelect('note.channel', 'channel');
+ .leftJoinAndSelect('note.channel', 'channel')
+ .leftJoinAndSelect('note.userInstance', 'userInstance')
+ .leftJoinAndSelect('note.replyUserInstance', 'replyUserInstance')
+ .leftJoinAndSelect('note.renoteUserInstance', 'renoteUserInstance');
const notes = (await query.getMany()).filter(noteFilter);