Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the push notification settings #1959

Closed
8 of 9 tasks
giomfo opened this issue May 23, 2023 · 2 comments
Closed
8 of 9 tasks

Expose the push notification settings #1959

giomfo opened this issue May 23, 2023 · 2 comments
Assignees

Comments

@giomfo
Copy link
Member

giomfo commented May 23, 2023

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:

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)
@giomfo
Copy link
Member Author

giomfo commented Jun 1, 2023

About notification settings handling. We made the following decisions:
1- user mentions are considered enabled at the SDK level as soon as one of the 3 push rules is enabled
2- room mentions are considered enabled at the SDK level as soon as one of the 2 push rules is enabled
3 (edited)- at the account level (Global settings), if all mentions and potential keyword rules are disabled, we will display a banner to let the user know we are not able to handle the Notification Settings in EX. If the user wants to unblock this situation, he may click on a button -> we force user mentions ON (the 3 push rules)
4 (edited)- at the room level, if a push rule has been created in global/room section with ruleId = roomId and action = "don't notify", we consider a custom setting: "Mentions & Keywords". If all mentions and potential keyword rules are disabled, we display a warning in EX room Notifications screen.
5 (edited)- if all mentions and potential keyword rules are disabled, we display a warning in the EX room Notifications screen when the user turns on the custom toggle.

@giomfo
Copy link
Member Author

giomfo commented Oct 18, 2023

I consider this task "Done"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants