mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -07:00
[backend] Don't emit followRequestAccepted if followee is not locked
Resolves #395
This commit is contained in:
parent
e5276e2765
commit
8ed1bda017
2 changed files with 8 additions and 4 deletions
|
@ -38,6 +38,7 @@ export async function insertFollowingDoc(
|
||||||
uri: User["host"];
|
uri: User["host"];
|
||||||
inbox: User["inbox"];
|
inbox: User["inbox"];
|
||||||
sharedInbox: User["sharedInbox"];
|
sharedInbox: User["sharedInbox"];
|
||||||
|
isLocked: User["isLocked"];
|
||||||
},
|
},
|
||||||
follower: {
|
follower: {
|
||||||
id: User["id"];
|
id: User["id"];
|
||||||
|
@ -92,10 +93,12 @@ export async function insertFollowingDoc(
|
||||||
followerId: follower.id,
|
followerId: follower.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create notification that request was accepted.
|
if (followee.isLocked) {
|
||||||
createNotification(follower.id, "followRequestAccepted", {
|
// Create notification that request was accepted.
|
||||||
notifierId: followee.id,
|
createNotification(follower.id, "followRequestAccepted", {
|
||||||
});
|
notifierId: followee.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alreadyFollowed) return;
|
if (alreadyFollowed) return;
|
||||||
|
|
|
@ -16,6 +16,7 @@ export default async function (
|
||||||
uri: User["host"];
|
uri: User["host"];
|
||||||
inbox: User["inbox"];
|
inbox: User["inbox"];
|
||||||
sharedInbox: User["sharedInbox"];
|
sharedInbox: User["sharedInbox"];
|
||||||
|
isLocked: User["isLocked"];
|
||||||
},
|
},
|
||||||
follower: CacheableUser,
|
follower: CacheableUser,
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in a new issue