fix: only send Update(Actor) to followers, #12674

This commit is contained in:
Julian Lam
2024-07-05 11:14:41 -04:00
parent 2cbd63dc31
commit 26946c7fe6

View File

@@ -175,7 +175,7 @@ activitypubApi.update = {};
activitypubApi.update.profile = enabledCheck(async (caller, { uid }) => {
const [object, targets] = await Promise.all([
activitypub.mocks.actors.user(uid),
db.getSortedSetMembers('usersRemote:lastCrawled'),
db.getSortedSetMembers(`followersRemote:${caller.uid}`),
]);
await activitypub.send('uid', caller.uid, targets, {
@@ -190,7 +190,7 @@ activitypubApi.update.profile = enabledCheck(async (caller, { uid }) => {
activitypubApi.update.category = enabledCheck(async (caller, { cid }) => {
const [object, targets] = await Promise.all([
activitypub.mocks.actors.category(cid),
db.getSortedSetMembers('usersRemote:lastCrawled'),
activitypub.notes.getCategoryFollowers(cid),
]);
await activitypub.send('cid', cid, targets, {