Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Oct 25, 2024

  • Don't create notifications for users that signed any terms already
  • Don't create notifications when enabling the app, but only after terms have been added
  • Don't generate notifications live on resetAllSignatures but use a cron job

Fix #1000

Scenario №1

  1. Set up ToS and accept them
  2. Close your browser (to not pull notifications)
  3. Disable and enable the app 5 times in a row
  4. Check the database to see that you received 5 notifications and also received 5 push notifications when a mobile app was set up, even though you accepted them already

Scenario №2

  1. Connect a mobile phone to receive pushes
  2. Enable the app (but don't configure any ToS)
  3. Check the database to see that you received s notification and also received s push notification, even though there are no terms that can be accepted

Scenario №3

  1. Have an instance with > 20k users also having mobile phones connected
  2. Set up ToS
  3. Press "Reset all signatures"
  4. Wait for the request to time out as we try to generate 20k notifications and push them

- Don't generate notifications live on resetAllSignatures but use a cron job
- Don't create notifications for users that signed any terms already
- Don't create notifications when enabling the app, but only after terms have been added

Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen
Copy link
Member Author

/backport to stable27

Copy link
Collaborator

@GretaD GretaD left a comment

Choose a reason for hiding this comment

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

I only tested scenario 1

@nickvergessen nickvergessen merged commit acbde6e into master Oct 25, 2024
28 checks passed
@nickvergessen nickvergessen deleted the bugfix/1000/fix-notification-generation branch October 25, 2024 13:49
@backportbot
Copy link

backportbot bot commented Oct 25, 2024

The backport to stable27 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable27
git pull origin stable27

# Create the new backport branch
git checkout -b backport/1009/stable27

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 03222a56

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1009/stable27

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

when the app is disabled and enabled again, the users should not be forced to accep the tos again

3 participants