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: Read receipts not generated when responding from notification (WPB-8756) #2994

Conversation

ohassine
Copy link
Member

@ohassine ohassine commented Sep 5, 2024

BugWPB-8756 [Android] Read receipts not generated when responding from notification popup


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

When we reply from head up notification, we don't mark older messages as read.

Solutions

Part of this fix is done here wireapp/wire-android#3420

I also found that we are duplicating the call of updateConversationReadDate(). It's being invoked when inserting a message and from conversation screen(0nScroll). So I removed the one from insertOrIgnoreMessage

Edit:
Not really duplicating, but updateConversationReadDate is being called on every message sent from self user (messageInsertion), this will keep the app preventing from sending read confirmations if we reply from notification, as we get messageIds based on date(dateAfter).

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


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.

@ohassine ohassine requested review from a team, typfel, yamilmedina, alexandreferris, borichellow and MohamadJaara and removed request for a team September 5, 2024 15:05
@echoes-hq echoes-hq bot added the echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. label Sep 5, 2024
Copy link

sonarqubecloud bot commented Sep 5, 2024

Copy link
Contributor

github-actions bot commented Sep 5, 2024

Test Results

3 196 tests   - 1   3 091 ✔️  - 1   3m 48s ⏱️ +39s
   550 suites ±0      105 💤 ±0 
   550 files   ±0          0 ±0 

Results for commit 34ee937. ± Comparison against base commit 933e17c.

This pull request removes 2 and adds 1 tests. Note that renamed tests count towards both.
com.wire.kalium.logic.data.message.PersistMessageUseCaseTest ‑ givenMissedCallMessage_whenRunningUseCase_thenCallPersistMessageWithUpdateConversationReadDateIsFalse[jvm]
com.wire.kalium.persistence.dao.message.MessageTextEditTest ‑ givenTextWasInsertedAndIsRead_whenUpdatingContentWithSelfMention_thenUnreadEventShouldNotChange[jvm]
com.wire.kalium.persistence.dao.message.MessageTextEditTest ‑ givenTextWasInsertedAndIsNotRead_whenUpdatingContentWithSelfMention_thenUnreadEventShouldNotChange[jvm]

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

🐰Bencher

ReportThu, September 5, 2024 at 15:21:52 UTC
Projectkalium
BranchRead-receipts-not-generated-when-responding-from-notification
Testbedubuntu-latest

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

  • Latency (latency)

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles➖ (view plot)694,539.87
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory➖ (view plot)604,388,466.09
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark➖ (view plot)925,674,859.59
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark➖ (view plot)21,331,392.52

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.57%. Comparing base (933e17c) to head (34ee937).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2994      +/-   ##
===========================================
- Coverage    52.58%   52.57%   -0.02%     
===========================================
  Files         1297     1297              
  Lines        49849    49841       -8     
  Branches      4650     4646       -4     
===========================================
- Hits         26214    26203      -11     
- Misses       21758    21771      +13     
+ Partials      1877     1867      -10     
Files with missing lines Coverage Δ
...ire/kalium/logic/data/message/MessageRepository.kt 49.60% <ø> (-0.01%) ⬇️
...kalium/logic/data/message/PersistMessageUseCase.kt 17.96% <ø> (-3.57%) ⬇️
.../wire/kalium/persistence/dao/message/MessageDAO.kt 100.00% <ø> (ø)
...e/kalium/persistence/dao/message/MessageDAOImpl.kt 69.84% <ø> (-0.35%) ⬇️

... and 1 file with indirect coverage changes


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 933e17c...34ee937. Read the comment docs.

@datadog-wireapp
Copy link

Datadog Report

Branch report: Read-receipts-not-generated-when-responding-from-notification
Commit report: a2bc964
Test service: kalium-jvm

✅ 0 Failed, 3091 Passed, 105 Skipped, 13.16s Total Time

@MohamadJaara MohamadJaara added this pull request to the merge queue Sep 14, 2024
Merged via the queue into develop with commit cbc5981 Sep 14, 2024
25 checks passed
@MohamadJaara MohamadJaara deleted the Read-receipts-not-generated-when-responding-from-notification branch September 14, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap Work aligned with the customer-announced roadmap, targeting a specific release date. 🚨 Potential breaking changes 👕 size: S type: bug / fix 🐞
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants