mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Add reblog and reply notifications
This commit is contained in:
parent
be9b2e3376
commit
82162fccf4
3 changed files with 61 additions and 0 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue