-
Notifications
You must be signed in to change notification settings - Fork 315
Closed
Description
The RustSDK defines the push rules in the ruma-common
crate, but does not currently expose them.
In order to allow the user to view and update the notification settings, we need to expose these rules in the ffi layer of the SDK.
We have two options:
- Expose the Ruleset (the internal type that contains the push rules) directly, but this means exposing also all the internal types and associated methods used by the SDK to store, get, create and delete a push rule.
- Expose only a set of methods and enumerations to get and update push rules.
The second option seems to be the best, as it will allow the management of notification settings to be shared between iOS and Android.
A minimal set of features to expose should be:
-
Room notification settings ([Story] Notification settings for a room element-hq/element-meta#1075):
- an enumeration defining the different notification modes: AllMessages, MentionsAndKeywordsOnly, Mute
- a method to check if a given room has a user-defined notification mode or if it uses the default one.
- a method to get the current notification mode
- some methods to define the notification mode
- set a custom mode
- remove a custom mode (switch back to the default)
-
Global notification settings ([Story] Add application settings screen for notifications element-hq/element-meta#1676):
- an enumeration defining the predefined push rules (
.m.rule.master
,.m.rule.room_one_to_one
, …) to check/enable/disable them -
[optional] a method to manage the keyword push rules (one global content rule per keyword) - consider the intentional mentions rules (see MSC3952: Intentional Mentions)
- a method to list all rooms with a user defined rule activated
- an enumeration defining the predefined push rules (
Also, the SDK should be able to notify the application when push rules are updated after a sync response.
- Update the application on push rules changes
Out of scope
- a method to manage the keyword push rules (one global content rule per keyword)
Metadata
Metadata
Assignees
Labels
No labels