1
0
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:
2020-06-22 14:32:14 +02:00
parent f8934d4e0a
commit b9a8dce1a5
6 changed files with 49 additions and 1 deletions

View File

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

View 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
}
}
}