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

feat: discover legal hold when sending message [WPB-5999] #2558

Merged
merged 5 commits into from Dec 28, 2023

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Dec 27, 2023

Sub-taskWPB-5999 Discover legal hold when sending messages


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

We need to discover missing/deleted legal hold clients and changes in legal hold for conversation on Android when sending messages and handle this change properly by showing system messages. If the legal hold status for conversation changed when sending a message, the user needs to be informed about that and decide whether he/she still wants to resend the message.

Solutions

Handle new type of failure LegalHoldEnabledForConversationFailure when sending a message and show a dialog informing the user that this conversation is under legal hold and give him/her option to decide whether he/she still wants to resend that message.

Dependencies (Optional)

Needs releases with:

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Enable legal hold for some other member before logging in and syncing, then login - at this point the app doesn't yet know that a conversation or member is under legal hold, but after sending first message, it should be handled properly.

Attachments (Optional)

legal_hold_discovery_send_message.mov

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

Copy link

codecov bot commented Dec 27, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (d141853) 41.16% compared to head (0d453cb) 41.25%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2558      +/-   ##
=============================================
+ Coverage      41.16%   41.25%   +0.08%     
- Complexity      1134     1138       +4     
=============================================
  Files            361      361              
  Lines          13160    13183      +23     
  Branches        1733     1738       +5     
=============================================
+ Hits            5417     5438      +21     
+ Misses          7216     7214       -2     
- Partials         527      531       +4     
Files Coverage Δ
.../ui/home/conversations/MessageComposerViewState.kt 88.88% <100.00%> (+1.38%) ⬆️
.../ui/home/conversations/MessageComposerViewModel.kt 81.66% <72.72%> (+0.66%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d141853...0d453cb. Read the comment docs.

Copy link
Contributor

github-actions bot commented Dec 27, 2023

Test Results

741 tests  +3   741 ✅ +3   9m 22s ⏱️ +46s
102 suites ±0     0 💤 ±0 
102 files   ±0     0 ❌ ±0 

Results for commit 0d453cb. ± Comparison against base commit d141853.

This pull request removes 3 and adds 6 tests. Note that renamed tests count towards both.
com.wire.android.ui.home.conversations.MessageComposerViewModelTest ‑ given that user chose to dismiss when enabled legal hold, when invoked sending, then message is not sent and dialog hidden()
com.wire.android.ui.home.conversations.MessageComposerViewModelTest ‑ given that user chose to send anyway when enabled legal hold, when invoked sending, then message is sent and dialog hidden()
com.wire.android.ui.home.conversations.MessageComposerViewModelTest ‑ given that user needs to be informed about enabled legal hold, when invoked sending, then message is not sent and dialog shown()
com.wire.android.ui.home.conversations.MessageComposerViewModelTest ‑ given that user chose to dismiss when enabled legal hold before sending, then message is not sent and dialog hidden()
com.wire.android.ui.home.conversations.MessageComposerViewModelTest ‑ given that user chose to dismiss when enabled legal hold when sending fails, then message is not resent and dialog hidden()
com.wire.android.ui.home.conversations.MessageComposerViewModelTest ‑ given that user chose to send anyway when enabled legal hold before sending, then message is sent and dialog hidden()
com.wire.android.ui.home.conversations.MessageComposerViewModelTest ‑ given that user chose to send anyway when enabled legal hold when sending fails, then message is resent and dialog hidden()
com.wire.android.ui.home.conversations.MessageComposerViewModelTest ‑ given that user needs to be informed about enabled legal hold when sending fails, then message is not resent and dialog shown()
com.wire.android.ui.home.conversations.MessageComposerViewModelTest ‑ given that user needs to be informed about enabled legal hold when sending, then message is not sent and dialog shown()

♻️ This comment has been updated with latest results.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@saleniuk saleniuk requested review from a team, typfel, yamilmedina, alexandreferris, borichellow, mchenani and Garzas and removed request for a team December 27, 2023 15:40
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@saleniuk saleniuk added this pull request to the merge queue Dec 28, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 28, 2023
@saleniuk saleniuk added this pull request to the merge queue Dec 28, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 28, 2023
@saleniuk saleniuk added this pull request to the merge queue Dec 28, 2023
Merged via the queue into develop with commit 21bbb68 Dec 28, 2023
14 checks passed
@saleniuk saleniuk deleted the feat/discover-legal-hold-when-sending-message branch December 28, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants