-
Notifications
You must be signed in to change notification settings - Fork 857
Save m.local_notification_settings.<device-id> event in account_data (PSG-873) #7630
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
Save m.local_notification_settings.<device-id> event in account_data (PSG-873) #7630
Conversation
| ) { | ||
|
|
||
| suspend fun execute(session: Session) { | ||
| if (unifiedPushHelper.isBackgroundSync()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this is the correct method to use to check if background sync is enabled. To be tested further to ensure it is working as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed the implementation so that we can rely on this method.
|
In order to have correct behavior, I need to first fix some bugs on the notification method selection process. |
ganfra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for all the tests.
a9121cd to
54d0e84
Compare
54d0e84 to
6c7ef69
Compare
|
@ganfra Could you take a look again please? I had to change several things which were not working correctly. I have also rebased my work on this PR in which I refactored some logic for unifiedPush to fix several issues. |
… be toggled using account data
b30dda7 to
f8c59f6
Compare
8d1b245 to
635f975
Compare
|
Kudos, SonarCloud Quality Gate passed! |








Type of change
Content
When background sync is used, on session start and each time we switch on background sync, account data event "org.matrix.msc3890.local_notification_settings." is updated.
When switching from background sync to regular push notifications method, any existing account data event is updated with empty content (API to delete an account data event is not available yet).
Also in this PR: renaming some notifications related use cases for consistency.
Motivation and context
Closes #7596
Screenshots / GIFs
Tests
Tests should be performed with both the GPlay and FDroid variant.
Tested devices
Checklist