@@ -322,8 +322,13 @@ impl TryFrom<Tweak> for SdkTweak {
322322#[ derive( Clone , uniffi:: Enum ) ]
323323/// Enum representing the push notification actions for a rule.
324324pub enum Action {
325- /// Causes matching events to generate a notification.
325+ /// Causes matching events to generate a notification (both in-app and
326+ /// remote / push).
326327 Notify ,
328+ /// Causes matching events to generate an in-app notification but no remote
329+ /// / push notification.
330+ #[ cfg( feature = "unstable-msc3768" ) ]
331+ NotifyInApp ,
327332 /// Sets an entry in the 'tweaks' dictionary sent to the push gateway.
328333 SetTweak { value : Tweak } ,
329334}
@@ -334,6 +339,8 @@ impl TryFrom<SdkAction> for Action {
334339 fn try_from ( value : SdkAction ) -> Result < Self , Self :: Error > {
335340 Ok ( match value {
336341 SdkAction :: Notify => Self :: Notify ,
342+ #[ cfg( feature = "unstable-msc3768" ) ]
343+ SdkAction :: NotifyInApp => Self :: NotifyInApp ,
337344 SdkAction :: SetTweak ( tweak) => Self :: SetTweak {
338345 value : tweak. try_into ( ) . map_err ( |e| format ! ( "Failed to convert tweak: {e}" ) ) ?,
339346 } ,
@@ -348,6 +355,8 @@ impl TryFrom<Action> for SdkAction {
348355 fn try_from ( value : Action ) -> Result < Self , Self :: Error > {
349356 Ok ( match value {
350357 Action :: Notify => Self :: Notify ,
358+ #[ cfg( feature = "unstable-msc3768" ) ]
359+ Action :: NotifyInApp => Self :: NotifyInApp ,
351360 Action :: SetTweak { value } => Self :: SetTweak (
352361 value. try_into ( ) . map_err ( |e| format ! ( "Failed to convert tweak: {e}" ) ) ?,
353362 ) ,
@@ -358,10 +367,14 @@ impl TryFrom<Action> for SdkAction {
358367/// Enum representing the push notification modes for a room.
359368#[ derive( Clone , uniffi:: Enum ) ]
360369pub enum RoomNotificationMode {
361- /// Receive notifications for all messages.
370+ /// Receive remote and in-app notifications for all messages.
362371 AllMessages ,
363- /// Receive notifications for mentions and keywords only.
372+ /// Receive remote and in-app notifications for mentions and keywords only.
364373 MentionsAndKeywordsOnly ,
374+ /// Receive remote and in-app notifications for mentions and keywords and
375+ /// in-app notifications only for other room messages.
376+ #[ cfg( feature = "unstable-msc3768" ) ]
377+ MentionsAndKeywordsOnlyTheRestInApp ,
365378 /// Do not receive any notifications.
366379 Mute ,
367380}
@@ -371,6 +384,10 @@ impl From<SdkRoomNotificationMode> for RoomNotificationMode {
371384 match value {
372385 SdkRoomNotificationMode :: AllMessages => Self :: AllMessages ,
373386 SdkRoomNotificationMode :: MentionsAndKeywordsOnly => Self :: MentionsAndKeywordsOnly ,
387+ #[ cfg( feature = "unstable-msc3768" ) ]
388+ SdkRoomNotificationMode :: MentionsAndKeywordsOnlyTheRestInApp => {
389+ Self :: MentionsAndKeywordsOnlyTheRestInApp
390+ }
374391 SdkRoomNotificationMode :: Mute => Self :: Mute ,
375392 }
376393 }
@@ -381,6 +398,10 @@ impl From<RoomNotificationMode> for SdkRoomNotificationMode {
381398 match value {
382399 RoomNotificationMode :: AllMessages => Self :: AllMessages ,
383400 RoomNotificationMode :: MentionsAndKeywordsOnly => Self :: MentionsAndKeywordsOnly ,
401+ #[ cfg( feature = "unstable-msc3768" ) ]
402+ RoomNotificationMode :: MentionsAndKeywordsOnlyTheRestInApp => {
403+ Self :: MentionsAndKeywordsOnlyTheRestInApp
404+ }
384405 RoomNotificationMode :: Mute => Self :: Mute ,
385406 }
386407 }
0 commit comments