diff --git a/packages/backend/src/services/following/create.ts b/packages/backend/src/services/following/create.ts index 3a77676b3..617073b66 100644 --- a/packages/backend/src/services/following/create.ts +++ b/packages/backend/src/services/following/create.ts @@ -38,6 +38,7 @@ export async function insertFollowingDoc( uri: User["host"]; inbox: User["inbox"]; sharedInbox: User["sharedInbox"]; + isLocked: User["isLocked"]; }, follower: { id: User["id"]; @@ -92,10 +93,12 @@ export async function insertFollowingDoc( followerId: follower.id, }); - // Create notification that request was accepted. - createNotification(follower.id, "followRequestAccepted", { - notifierId: followee.id, - }); + if (followee.isLocked) { + // Create notification that request was accepted. + createNotification(follower.id, "followRequestAccepted", { + notifierId: followee.id, + }); + } } if (alreadyFollowed) return; diff --git a/packages/backend/src/services/following/requests/accept.ts b/packages/backend/src/services/following/requests/accept.ts index 6aa17b09a..800b139a1 100644 --- a/packages/backend/src/services/following/requests/accept.ts +++ b/packages/backend/src/services/following/requests/accept.ts @@ -16,6 +16,7 @@ export default async function ( uri: User["host"]; inbox: User["inbox"]; sharedInbox: User["sharedInbox"]; + isLocked: User["isLocked"]; }, follower: CacheableUser, ) {