1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-20 16:35:17 +00:00

Create new groups

This commit is contained in:
2020-06-24 09:08:31 +02:00
parent d38e2ee4ab
commit 5a14aaee31
9 changed files with 139 additions and 5 deletions

View File

@ -22,4 +22,5 @@ pub mod conversation_message_api;
pub mod conversations_refresh_api;
pub mod res_count_unread_conversations;
pub mod list_unread_conversations_api;
pub mod global_search_result_api;
pub mod global_search_result_api;
pub mod res_create_group;

View File

@ -0,0 +1,23 @@
//! # Group creation result
//!
//! Result of the creation of a new group
use serde::Serialize;
use crate::data::group_id::GroupID;
#[derive(Serialize)]
pub struct GroupCreationResult {
success: String,
id: u64,
}
impl GroupCreationResult {
/// Construct a new instance of this object
pub fn new(id: &GroupID) -> GroupCreationResult {
GroupCreationResult {
success: "The group has been successfully created!".to_string(),
id: id.id(),
}
}
}