mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 16:35:17 +00:00
Create new groups
This commit is contained in:
@ -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;
|
23
src/api_data/res_create_group.rs
Normal file
23
src/api_data/res_create_group.rs
Normal 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(),
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user