Sent notifications for friendship requests

This commit is contained in:
Pierre
2018-03-03 14:28:29 +01:00
parent 9213ad239c
commit ef7d786e9e
4 changed files with 64 additions and 6 deletions

View File

@ -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 {

View File

@ -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";