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

Add new setting

This commit is contained in:
2021-04-10 19:20:03 +02:00
parent e725d24104
commit 138142f52d
3 changed files with 5 additions and 1 deletions

View File

@ -9,12 +9,14 @@ use crate::data::user::User;
#[derive(Serialize)]
pub struct NotificationSettingsAPI {
allow_conversations: bool,
allow_notifications_sound: bool,
}
impl NotificationSettingsAPI {
pub fn new(user: &User) -> Self {
Self {
allow_conversations: user.allow_notif_conv
allow_conversations: user.allow_notif_conv,
allow_notifications_sound: user.allow_notif_sound,
}
}
}