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

avoid duplicated messages after sending #4688

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Feb 5, 2025

It could happen that when sending a message it was received on server but if the servers response is not received, the retry was triggered in the talk app. This sometimes happened when internet connection was not the best.

Best would be that messages with the same referenceId would be refused on server side, but this won't be the case for now. So messages with the same referenceId are NOT refused as this would be too much overhead as there would be additional queries on server for every received message)

For now, the automatic retry logic is just removed so duplicated messages won't be created automatically. However it's still possible to manually trigger the retry via button. In this case it is not guaranteed that there won't be duplicates.


Also see comment #2171 (comment)

🏁 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 added the 3. to review Waiting for reviews label Feb 5, 2025
@mahibi mahibi added this to the 21.1.0 milestone Feb 5, 2025
@mahibi mahibi self-assigned this Feb 5, 2025
@mahibi
Copy link
Collaborator Author

mahibi commented Feb 5, 2025

/backport to stable-21.0

It could happen that when sending a message it was received on server but if the servers response is not received, the retry was triggered in the talk app.
This sometimes happened when internet connection was not the best.

Best would be that messages with the same referenceId would be refused on server side, but this won't be the case for now. So messages with the same referenceId are NOT refused as this would be too much overhead as there would be additional queries on server for every received message)

For now, the automatic retry logic is just removed so duplicated messages won't be created automatically.
However it's still possible to manually trigger the retry via button. In this case it is not guaranteed that there won't be duplicates.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi force-pushed the bugfix/noid/avoidDuplicatedMessagesAfterSend branch from 0fdd10f to 09a6cfb Compare February 5, 2025 14:56
Copy link
Contributor

github-actions bot commented Feb 5, 2025

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4688-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.

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Codacy

Lint

TypemasterPR
Warnings104104
Errors3636

SpotBugs

CategoryBaseNew
Bad practice66
Correctness222222
Dodgy code7171
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total310310

@mahibi mahibi merged commit 11fc9fa into master Feb 6, 2025
18 checks passed
@mahibi mahibi deleted the bugfix/noid/avoidDuplicatedMessagesAfterSend branch February 6, 2025 14:58
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
Development

Successfully merging this pull request may close these issues.

2 participants