mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 16:35:17 +00:00
Add new setting
This commit is contained in:
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user