mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 16:35:17 +00:00
Count the number of unread conversations of a user
This commit is contained in:
@ -19,4 +19,5 @@ pub mod conversation_api;
|
||||
mod legacy_api_bool;
|
||||
pub mod res_find_private_conversations;
|
||||
pub mod conversation_message_api;
|
||||
pub mod conversations_refresh_api;
|
||||
pub mod conversations_refresh_api;
|
||||
pub mod res_count_unread_conversations;
|
18
src/api_data/res_count_unread_conversations.rs
Normal file
18
src/api_data/res_count_unread_conversations.rs
Normal file
@ -0,0 +1,18 @@
|
||||
//! Count the number of unread conversations of a given user
|
||||
//!
|
||||
//! @author Pierre Hubert
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct ResultCountUnreadConversations {
|
||||
nb_unread: usize
|
||||
}
|
||||
|
||||
impl ResultCountUnreadConversations {
|
||||
/// Generate an new instance
|
||||
pub fn new(count: usize) -> ResultCountUnreadConversations {
|
||||
ResultCountUnreadConversations {
|
||||
nb_unread: count
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user