1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-22 01:15:16 +00:00

/notifications/mark_seen is fully implemented

This commit is contained in:
2020-07-11 14:10:01 +02:00
parent b133827c61
commit 2fc6b83f77
2 changed files with 25 additions and 9 deletions

View File

@ -153,6 +153,24 @@ pub struct Notification {
pub container_type: Option<NotifElemType>,
}
impl Notification {
pub fn into_partial(self) -> PartialNotification {
PartialNotification {
id: Some(self.id),
time_create: Some(self.time_create),
seen: Some(self.seen),
from_user_id: Some(self.from_user_id),
dest_user_id: Some(self.dest_user_id),
on_elem_id: Some(self.on_elem_id),
on_elem_type: Some(self.on_elem_type),
kind: Some(self.kind),
visibility: Some(self.visibility),
container_id: self.container_id,
container_type: self.container_type,
}
}
}
pub struct PartialNotification {
pub id: Option<u64>,
pub time_create: Option<u64>,