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

refactor onModalSubmit in TransferQuestionCommand to handle multiple users submission #955

Merged
merged 4 commits into from
Nov 20, 2023
Merged

refactor onModalSubmit in TransferQuestionCommand to handle multiple users submission #955

merged 4 commits into from
Nov 20, 2023

Conversation

ankitsmt211
Copy link
Member

@ankitsmt211 ankitsmt211 commented Nov 17, 2023

Problem:
When multiple users use transfer-question feature at the same time, it can lead to creation of two or more threads in helper forum in rare occasions. To verify this you'd prolly need an alt account to time it correclty.

Solution:
Bug fix handles this problem by retrieving the original message that needs to be transferred on submitting the transfer modal,
if it's already transferred then message shouldn't be present.

Implementation:

  • extracted onModalSubmit chain to a method transferFlow for clarity.
  • added a method(handledAlready) to notify user if the transfer was already handled.

@ankitsmt211 ankitsmt211 requested review from a team as code owners November 17, 2023 03:38
@ankitsmt211 ankitsmt211 self-assigned this Nov 17, 2023
@ankitsmt211 ankitsmt211 added bug Something isn't working priority: normal labels Nov 17, 2023
@ankitsmt211 ankitsmt211 changed the title refactor onModalSubmit to handle multiple users submission refactor onModalSubmit in TransferQuestionCommand to handle multiple users submission Nov 17, 2023
@ankitsmt211 ankitsmt211 merged commit 1d1f09a into Together-Java:develop Nov 20, 2023
9 checks passed
@Zabuzard Zabuzard mentioned this pull request Nov 22, 2023
@ankitsmt211 ankitsmt211 deleted the bug/transfer-race-condition branch November 30, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants