Add reblog and reply notifications

This commit is contained in:
Jesse Wierzbinski 2023-11-23 08:35:43 -10:00
parent be9b2e3376
commit 82162fccf4
No known key found for this signature in database
3 changed files with 61 additions and 0 deletions

View file

@ -436,6 +436,19 @@ export const createNewStatus = async (data: {
include: statusAndUserRelations,
});
// Create notification
if (status.inReplyToPost) {
await client.notification.create({
data: {
notifiedId: status.inReplyToPost.authorId,
accountId: status.authorId,
type: "mention",
statusId: status.id,
},
});
}
return status;
};