diff --git a/bindings/matrix-sdk-ffi/src/api.udl b/bindings/matrix-sdk-ffi/src/api.udl index 38e8fdaa7..76e2de280 100644 --- a/bindings/matrix-sdk-ffi/src/api.udl +++ b/bindings/matrix-sdk-ffi/src/api.udl @@ -22,8 +22,6 @@ dictionary NotificationItem { boolean is_noisy; boolean is_direct; boolean is_encrypted; - boolean is_read; - u64 timestamp; }; interface TimelineEvent {}; diff --git a/bindings/matrix-sdk-ffi/src/event.rs b/bindings/matrix-sdk-ffi/src/event.rs index 0c30d7780..04fac27b5 100644 --- a/bindings/matrix-sdk-ffi/src/event.rs +++ b/bindings/matrix-sdk-ffi/src/event.rs @@ -19,6 +19,10 @@ impl TimelineEvent { self.0.sender().to_string() } + pub fn timestamp(&self) -> u64 { + self.0.origin_server_ts().0.into() + } + pub fn event_type(&self) -> Result { let event_type = match &self.0 { AnySyncTimelineEvent::MessageLike(event) => { diff --git a/bindings/matrix-sdk-ffi/src/notification_service.rs b/bindings/matrix-sdk-ffi/src/notification_service.rs index 462968682..16cf23fbf 100644 --- a/bindings/matrix-sdk-ffi/src/notification_service.rs +++ b/bindings/matrix-sdk-ffi/src/notification_service.rs @@ -18,9 +18,6 @@ pub struct NotificationItem { pub is_noisy: bool, pub is_direct: bool, pub is_encrypted: bool, - pub is_read: bool, - - pub timestamp: u64, } impl NotificationItem { @@ -48,8 +45,6 @@ impl NotificationItem { is_noisy, is_direct: room.is_direct().await?, is_encrypted: room.is_encrypted().await?, - is_read: notification.read, - timestamp: notification.ts.0.into(), }; Ok(item) }