feat: pending follows and logic for remote users, #12938

This commit is contained in:
Julian Lam
2024-12-11 13:27:34 -05:00
parent fcf0f79987
commit 2851e56bdc
4 changed files with 13 additions and 0 deletions

View File

@@ -90,6 +90,7 @@ activitypubApi.unfollow = enabledCheck(async (caller, { type, id, actor }) => {
if (type === 'uid') {
await Promise.all([
db.sortedSetRemove(`followingRemote:${id}`, actor),
db.sortedSetRemove(`followRequests:uid.${id}`, actor),
db.decrObjectField(`user:${id}`, 'followingRemoteCount'),
]);
} else if (type === 'cid') {