mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-20 16:45:16 +00:00
And frienship notifications support
This commit is contained in:
@ -2,6 +2,8 @@ import { Friend } from "../entities/Friend";
|
||||
import { RequestHandler } from "../entities/RequestHandler";
|
||||
import { FriendsHelper } from "../helpers/FriendsHelper";
|
||||
import { UserHelper } from "../helpers/UserHelper";
|
||||
import { NotificationsUtils } from "../utils/NotificationsUtils";
|
||||
import { NotifEventType } from "../entities/Notification";
|
||||
|
||||
/**
|
||||
* Friends controller
|
||||
@ -110,7 +112,9 @@ export class FriendsController {
|
||||
// Send the request
|
||||
await FriendsHelper.SendRequest(h.getUserId(), friendID);
|
||||
|
||||
// TODO : create the notification
|
||||
// Create the notification
|
||||
await NotificationsUtils.CreateFriendsNotifications(
|
||||
h.getUserId(), friendID, NotifEventType.SENT_FRIEND_REQUEST)
|
||||
|
||||
h.success("Send (create) the friendship request");
|
||||
}
|
||||
|
Reference in New Issue
Block a user