mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 01:13:48 +01:00
フォローインポートで自分をスキップするように (#4614)
* skip myself in import-following * skip owner in publishToFollowers
This commit is contained in:
parent
f95fa2c1b8
commit
c0927a24be
@ -45,6 +45,9 @@ export async function importFollowing(job: Bull.Job, done: any): Promise<void> {
|
|||||||
target = await resolveUser(username, host);
|
target = await resolveUser(username, host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// skip myself
|
||||||
|
if (target._id.equals(job.data.user._id)) continue;
|
||||||
|
|
||||||
logger.info(`Follow ${target._id} ...`);
|
logger.info(`Follow ${target._id} ...`);
|
||||||
|
|
||||||
follow(user, target);
|
follow(user, target);
|
||||||
|
@ -568,7 +568,8 @@ async function publishToFollowers(note: INote, user: IUser, noteActivity: any) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const followers = await Following.find({
|
const followers = await Following.find({
|
||||||
followeeId: note.userId
|
followeeId: note.userId,
|
||||||
|
followerId: { $ne: note.userId } // バグでフォロワーに自分がいることがあるため
|
||||||
});
|
});
|
||||||
|
|
||||||
const queue: string[] = [];
|
const queue: string[] = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user