From 5591070979395757deca8cdb1b29b91a9953ef8a Mon Sep 17 00:00:00 2001 From: Max Nuding Date: Tue, 8 Jul 2025 14:38:11 +0200 Subject: [PATCH] finalize ignore feature --- src/lib/server/timeline.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lib/server/timeline.ts b/src/lib/server/timeline.ts index 415975e..6012a52 100644 --- a/src/lib/server/timeline.ts +++ b/src/lib/server/timeline.ts @@ -374,18 +374,16 @@ export class TimelineReader { } private async checkAndSavePost(post: Post) { - if (IGNORE_USERS !== undefined && IGNORE_USERS !== '' && IGNORE_USERS !== 'CHANGE_ME') { - const ignorelist = IGNORE_USERS.split(','); - const isIgnored = ignorelist.includes(post.account.username); - const isIgnoredDb = this.ignoredUsers.includes(post.account.username); - this.logger.debug( - 'Check if user', + const isIgnored = this.ignoredUsers.includes(post.account.username); + if (isIgnored) { + this.logger.info( + 'Ignoring post by ignored user', post.account.username, 'is ignored', this.ignoredUsers, - isIgnored, - isIgnoredDb + isIgnored ); + return; } const hashttags: string[] = HASHTAG_FILTER.split(',');