From 59dc9294313f2654b518d6fb05ed3d53ff056ce9 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 6 Apr 2019 00:07:23 +0900 Subject: フォローインポートで自分をスキップするように (#4614) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * skip myself in import-following * skip owner in publishToFollowers --- src/queue/processors/db/import-following.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/queue') diff --git a/src/queue/processors/db/import-following.ts b/src/queue/processors/db/import-following.ts index ad9129c1f5..a1242b71c8 100644 --- a/src/queue/processors/db/import-following.ts +++ b/src/queue/processors/db/import-following.ts @@ -45,6 +45,9 @@ export async function importFollowing(job: Bull.Job, done: any): Promise { target = await resolveUser(username, host); } + // skip myself + if (target._id.equals(job.data.user._id)) continue; + logger.info(`Follow ${target._id} ...`); follow(user, target); -- cgit v1.2.3-freya