mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-20 16:45:16 +00:00
Create notification when posting a new comment
This commit is contained in:
@ -4,6 +4,8 @@ import { LikesHelper, LikesType } from "../helpers/LikesHelper";
|
||||
import { check_string_before_insert, removeHTMLNodes } from "../utils/StringUtils";
|
||||
import { time } from "../utils/DateUtils";
|
||||
import { CommentsHelper } from "../helpers/CommentsHelper";
|
||||
import { NotificationsUtils } from "../utils/NotificationsUtils";
|
||||
import { NotifEventType } from "../entities/Notification";
|
||||
|
||||
/**
|
||||
* Comments controller
|
||||
@ -43,7 +45,8 @@ export class CommentsController {
|
||||
|
||||
const commentID = await CommentsHelper.Create(newComment);
|
||||
|
||||
// TODO : Create notifications
|
||||
// Create notifications
|
||||
await NotificationsUtils.CreatePostNotification(h.getUserId(), postID, NotifEventType.COMMENT_CREATED);
|
||||
|
||||
// TODO : Delete any notifications targetting this user about the post
|
||||
|
||||
|
Reference in New Issue
Block a user