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

Fix to delete user when unregister for notifications failed #3454

Merged

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Nov 20, 2023

it's not yet tested, but from my pov this should...
fix #3243
fix #3105

Not sure for which cases unregister for notifications might fail, maybe @nickvergessen knows best.
Further improvements for user deletions will come with #3436

🚧 TODO

  • do some manual debugging/testing

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi self-assigned this Nov 20, 2023
@mahibi mahibi added the 3. to review Waiting for reviews label Nov 20, 2023
@mahibi mahibi added this to the 18.0.0 milestone Nov 20, 2023
@@ -129,6 +129,7 @@ public void onNext(@io.reactivex.annotations.NonNull GenericOverall genericOvera
@Override
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
Log.e(TAG, "error while trying to unregister Device For Notifications", e);
initiateUserDeletion(user);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

especially this missing deletion command caused bugs..

Copy link
Member

@AndyScherzinger AndyScherzinger left a comment

Choose a reason for hiding this comment

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

Lgtm code wise 👍

@nickvergessen
Copy link
Member

Not sure for which cases unregister for notifications might fail

Nextcloud Server? Invalid auth because the token was removed, ...
Push proxy? Invalid user key because it was updated/changed somehow (reinstall of a setup etc. Incomplete backup restore, ...)

Whenever there was an error when unregistering from notifications, the user was not deleted.
This could lead to multiple bugs.

Furthermore, external signaling server connection and arbitrary storage is now always handled for user deletion, which was not the case before.

Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi force-pushed the bugfix/noid/deleteUserWhenUnregisterForNotificationsFailed branch from 021af62 to 423ce97 Compare November 21, 2023 09:37
@mahibi mahibi merged commit fc42fe9 into master Nov 21, 2023
14 of 15 checks passed
@delete-merged-branch delete-merged-branch bot deleted the bugfix/noid/deleteUserWhenUnregisterForNotificationsFailed branch November 21, 2023 09:37
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings8989
Errors00

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1010
Dodgy code123123
Internationalization55
Malicious code vulnerability33
Performance88
Security22
Total157157

Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3454-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
3 participants