fix: include myself
This commit is contained in:
parent
c9dd562145
commit
4f5f601c1d
1 changed files with 4 additions and 4 deletions
|
@ -236,17 +236,17 @@ export default async function (
|
||||||
});
|
});
|
||||||
|
|
||||||
const noteUserIds = new Set(notesToDelete.map((n) => n.userId));
|
const noteUserIds = new Set(notesToDelete.map((n) => n.userId));
|
||||||
const followers: string[] = [];
|
const meAndFollowers: string[] = [note.userId];
|
||||||
for (const id of noteUserIds) {
|
for (const id of noteUserIds) {
|
||||||
const list = await LocalFollowersCache.init(id).then((cache) =>
|
const list = await LocalFollowersCache.init(id).then((cache) =>
|
||||||
cache.getAll(),
|
cache.getAll(),
|
||||||
);
|
);
|
||||||
followers.push(...list);
|
meAndFollowers.push(...list);
|
||||||
}
|
}
|
||||||
const localFollowers = new Set(followers);
|
const feedUserIds = new Set(meAndFollowers);
|
||||||
const homeDeleteParams = notesToDelete.map((n) => {
|
const homeDeleteParams = notesToDelete.map((n) => {
|
||||||
const tuples: [string, Date, Date, string][] = [];
|
const tuples: [string, Date, Date, string][] = [];
|
||||||
for (const feedUserId of localFollowers) {
|
for (const feedUserId of feedUserIds) {
|
||||||
tuples.push([feedUserId, n.createdAt, n.createdAt, n.userId]);
|
tuples.push([feedUserId, n.createdAt, n.createdAt, n.userId]);
|
||||||
}
|
}
|
||||||
return tuples;
|
return tuples;
|
||||||
|
|
Loading…
Reference in a new issue