mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-11-04 09:34:04 +00:00 
			
		
		
		
	Get the list of unread conversations
This commit is contained in:
		@@ -16,6 +16,7 @@ use crate::data::new_conversation::NewConversation;
 | 
			
		||||
use crate::data::new_conversation_message::NewConversationMessage;
 | 
			
		||||
use crate::helpers::{conversations_helper, user_helper};
 | 
			
		||||
use crate::utils::string_utils::remove_html_nodes;
 | 
			
		||||
use crate::api_data::list_unread_conversations_api::UnreadConversationAPI;
 | 
			
		||||
 | 
			
		||||
/// Create a new conversation
 | 
			
		||||
pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
 | 
			
		||||
@@ -285,5 +286,7 @@ pub fn count_unread(r: &mut HttpRequestHandler) -> RequestResult {
 | 
			
		||||
 | 
			
		||||
/// Get the list of unread conversations of a user
 | 
			
		||||
pub fn list_unread(r: &mut HttpRequestHandler) -> RequestResult {
 | 
			
		||||
    r.success("implement me")
 | 
			
		||||
    let list = conversations_helper::get_list_unread(r.user_id()?)?;
 | 
			
		||||
 | 
			
		||||
    r.set_response(UnreadConversationAPI::for_list(&list))
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user