mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-20 23:25:28 +02:00
Use for-of instead of map
return values are not being used
This commit is contained in:
@@ -117,14 +117,14 @@ async function CreateRemoteInboxes(user: ILocalUser): Promise<string[]> {
|
||||
|
||||
const queue: string[] = [];
|
||||
|
||||
followers.map(following => {
|
||||
for (const following of followers) {
|
||||
const follower = following._follower;
|
||||
|
||||
if (isRemoteUser(follower)) {
|
||||
const inbox = follower.sharedInbox || follower.inbox;
|
||||
if (!queue.includes(inbox)) queue.push(inbox);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return queue;
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@ export async function publishToFollowers(userId: mongo.ObjectID) {
|
||||
|
||||
// フォロワーがリモートユーザーかつ投稿者がローカルユーザーならUpdateを配信
|
||||
if (isLocalUser(user)) {
|
||||
followers.map(following => {
|
||||
for (const following of followers) {
|
||||
const follower = following._follower;
|
||||
|
||||
if (isRemoteUser(follower)) {
|
||||
const inbox = follower.sharedInbox || follower.inbox;
|
||||
if (!queue.includes(inbox)) queue.push(inbox);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (queue.length > 0) {
|
||||
const content = packAp(renderUpdate(await renderPerson(user), user));
|
||||
|
||||
Reference in New Issue
Block a user