1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-21 08:55:16 +00:00

Can get notification settings

This commit is contained in:
2021-04-10 19:12:46 +02:00
parent 7ec2c500e3
commit 2b2b1c9755
7 changed files with 40 additions and 15 deletions

View File

@ -68,4 +68,5 @@ pub mod call_peer_interrupted_streaming;
pub mod res_check_password_token;
pub mod removed_user_from_conv_message;
pub mod user_is_writing_message_in_conversation;
pub mod res_create_conversation_for_group;
pub mod res_create_conversation_for_group;
pub mod notification_settings_api;

View File

@ -0,0 +1,20 @@
//! # Notification settings API
//!
//! @author Pierre Hubert
use serde::Serialize;
use crate::data::user::User;
#[derive(Serialize)]
pub struct NotificationSettingsAPI {
allow_conversations: bool,
}
impl NotificationSettingsAPI {
pub fn new(user: &User) -> Self {
Self {
allow_conversations: user.allow_notif_conv
}
}
}