Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add device notifications enabled switch #9324

Merged
merged 12 commits into from
Sep 28, 2022

Conversation

germain-gg
Copy link
Contributor

@germain-gg germain-gg commented Sep 28, 2022

Fixes https://element-io.atlassian.net/browse/PSG-783
Fixes https://element-io.atlassian.net/browse/PSG-802
Implements matrix-org/matrix-spec-proposals#3890

Adds a "enable for this device" toggle in the notifications settings.

All new session will pro-actively create a m.local_notification_settings.<device-id> account data event with a default of is_silenced=true.
Sessions that were created before this feature lands will check whether the account data event exists, and create it if needed. The default will be is_silenced=true unless one of the following settings has previously been set to true.

  • notificationsEnabled (oddly named, but it refers to OS native push notifications)
  • notificationBodyEnabled
  • audioNotificationsEnabled

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

Here's what your changelog entry will look like:

✨ Features

  • Add device notifications enabled switch (#9324).

@germain-gg germain-gg added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Sep 28, 2022
@germain-gg germain-gg requested a review from a team as a code owner September 28, 2022 09:27
Copy link
Contributor

@kerryarchibald kerryarchibald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@germain-gg
Copy link
Contributor Author

@kerryarchibald thanks for the review.
I've added some more tests to pass the quality gate, and I have encountered an issue that I have not encountered before... I can't override the mocked implementation of SettingsStore on a per test basis. I've commented out that bit for now.

Any thoughts on what could be the cause here?

@germain-gg germain-gg deleted the gsouquet/notification-toggle-psg-783 branch September 28, 2022 17:13
odelcroi added a commit to tchapgouv/tchap-web-v4 that referenced this pull request Oct 5, 2022
* Device manager - select all devices ([\#9330](matrix-org/matrix-react-sdk#9330)). Contributed by @kerryarchibald.
* New group call experience: Call tiles ([\#9332](matrix-org/matrix-react-sdk#9332)).
* Add Shift key to FormatQuote keyboard shortcut ([\#9298](matrix-org/matrix-react-sdk#9298)). Contributed by @owi92.
* Device manager - sign out of multiple sessions ([\#9325](matrix-org/matrix-react-sdk#9325)). Contributed by @kerryarchibald.
* Display push toggle for web sessions (MSC3890) ([\#9327](matrix-org/matrix-react-sdk#9327)).
* Add device notifications enabled switch ([\#9324](matrix-org/matrix-react-sdk#9324)).
* Implement push notification toggle in device detail ([\#9308](matrix-org/matrix-react-sdk#9308)).
* New group call experience: Starting and ending calls ([\#9318](matrix-org/matrix-react-sdk#9318)).
* New group call experience: Room header call buttons ([\#9311](matrix-org/matrix-react-sdk#9311)).
* Make device ID copyable in device list ([\#9297](matrix-org/matrix-react-sdk#9297)). Contributed by @duxovni.
* Use display name instead of user ID when rendering power events ([\#9295](matrix-org/matrix-react-sdk#9295)).
* Read receipts for threads ([\#9239](matrix-org/matrix-react-sdk#9239)). Fixes #23191.
* Fix device selection in pre-join screen for Element Call video rooms ([\#9321](matrix-org/matrix-react-sdk#9321)). Fixes #23331.
* Don't render a 1px high room topic if the room topic is empty ([\#9317](matrix-org/matrix-react-sdk#9317)). Contributed by @Arnei.
* Don't show feedback prompts when that UIFeature is disabled ([\#9305](matrix-org/matrix-react-sdk#9305)). Fixes #23327.
* Fix soft crash around unknown room pills ([\#9301](matrix-org/matrix-react-sdk#9301)). Fixes matrix-org/element-web-rageshakes#15465.
* Fix spaces feedback prompt wrongly showing when feedback is disabled ([\#9302](matrix-org/matrix-react-sdk#9302)). Fixes #23314.
* Fix tile soft crash in ReplyInThreadButton ([\#9300](matrix-org/matrix-react-sdk#9300)). Fixes matrix-org/element-web-rageshakes#15493.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants