mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 00:25:18 +00:00
Can get the number of unread conversations of a user
This commit is contained in:
@ -386,6 +386,22 @@ class conversationsController{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of unread conversations of the user
|
||||
*
|
||||
* @url POST conversations/get_number_unread
|
||||
*/
|
||||
public function get_number_unread(){
|
||||
|
||||
user_login_required();
|
||||
|
||||
//Get the number of unread conversations of the user
|
||||
$number_unread_conversations = components()->conversations->number_user_unread(userID);
|
||||
|
||||
//Return result
|
||||
return array("nb_unread" => $number_unread_conversations);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a conversation
|
||||
*
|
||||
|
Reference in New Issue
Block a user