From 034aa04076c6d482837dbe5b9d4e712c0478b5ff Mon Sep 17 00:00:00 2001 From: Mauro <34335419+Velin92@users.noreply.github.com> Date: Fri, 28 Apr 2023 18:04:42 +0200 Subject: [PATCH] ffi: Add is_read field to NotificationItem --- bindings/matrix-sdk-ffi/src/api.udl | 1 + bindings/matrix-sdk-ffi/src/notification_service.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/bindings/matrix-sdk-ffi/src/api.udl b/bindings/matrix-sdk-ffi/src/api.udl index 76e2de280..bea96f275 100644 --- a/bindings/matrix-sdk-ffi/src/api.udl +++ b/bindings/matrix-sdk-ffi/src/api.udl @@ -22,6 +22,7 @@ dictionary NotificationItem { boolean is_noisy; boolean is_direct; boolean is_encrypted; + boolean is_read; }; interface TimelineEvent {}; diff --git a/bindings/matrix-sdk-ffi/src/notification_service.rs b/bindings/matrix-sdk-ffi/src/notification_service.rs index 16cf23fbf..caf6ceb6a 100644 --- a/bindings/matrix-sdk-ffi/src/notification_service.rs +++ b/bindings/matrix-sdk-ffi/src/notification_service.rs @@ -18,6 +18,7 @@ pub struct NotificationItem { pub is_noisy: bool, pub is_direct: bool, pub is_encrypted: bool, + pub is_read: bool, } impl NotificationItem { @@ -45,6 +46,7 @@ impl NotificationItem { is_noisy, is_direct: room.is_direct().await?, is_encrypted: room.is_encrypted().await?, + is_read: notification.read, }; Ok(item) }