summaryrefslogtreecommitdiff
path: root/src/queue
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2019-04-06 00:07:23 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-04-06 00:07:23 +0900
commit59dc9294313f2654b518d6fb05ed3d53ff056ce9 (patch)
tree47a78dba0091a477452d38e81111236281f9211e /src/queue
parentUpdate README.md [AUTOGEN] (#4634) (diff)
downloadsharkey-59dc9294313f2654b518d6fb05ed3d53ff056ce9.tar.gz
sharkey-59dc9294313f2654b518d6fb05ed3d53ff056ce9.tar.bz2
sharkey-59dc9294313f2654b518d6fb05ed3d53ff056ce9.zip
フォローインポートで自分をスキップするように (#4614)
* skip myself in import-following * skip owner in publishToFollowers
Diffstat (limited to 'src/queue')
-rw-r--r--src/queue/processors/db/import-following.ts3
1 files changed, 3 insertions, 0 deletions
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<void> {
target = await resolveUser(username, host);
}
+ // skip myself
+ if (target._id.equals(job.data.user._id)) continue;
+
logger.info(`Follow ${target._id} ...`);
follow(user, target);