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(',');