mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 00:25:18 +00:00
Sent notifications for friendship requests
This commit is contained in:
@ -143,6 +143,18 @@ class notificationComponent {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Handles friendship request notifications
|
||||
else if($notification->get_on_elem_type() == Notification::FRIENDSHIP_REQUEST){
|
||||
|
||||
//Complete the notification
|
||||
$notification->set_from_container_id(0);
|
||||
$notification->set_from_container_type("");
|
||||
|
||||
//Push the notification in private way
|
||||
return $this->push_private($notification);
|
||||
|
||||
}
|
||||
|
||||
//Unsupported element
|
||||
else {
|
||||
|
@ -23,11 +23,15 @@ class Notification {
|
||||
const POST_TIMER = "post_timer";
|
||||
const POST_SURVEY = "post_survey";
|
||||
const COMMENT = "comment";
|
||||
const FRIENDSHIP_REQUEST = "friend";
|
||||
|
||||
/**
|
||||
* Event type
|
||||
*/
|
||||
const COMMENT_CREATED = "comment_created";
|
||||
const SENT_FRIEND_REQUEST = "sent_friend_request";
|
||||
const ACCEPTED_FRIEND_REQUEST = "accepted_request";
|
||||
const REJECTED_FRIEND_REQUEST = "rejected_request";
|
||||
const ELEM_CREATED = "elem_created";
|
||||
const ELEM_UPDATED = "elem_updated";
|
||||
|
||||
|
Reference in New Issue
Block a user