Skip to content

Fix public read receipts being sent by mistake#6838

Open
jmartinesp wants to merge 1 commit into
developfrom
fix/incorretly-send-public-read-receipt-when-returning-to-chat-screen
Open

Fix public read receipts being sent by mistake#6838
jmartinesp wants to merge 1 commit into
developfrom
fix/incorretly-send-public-read-receipt-when-returning-to-chat-screen

Conversation

@jmartinesp
Copy link
Copy Markdown
Member

Content

When returning to the chat screen from the room details one or a member's profile, TimelineEvent.OnScrollFinished will be called immediately, and this would read the default value for isSendPublicReadReceiptsEnabled, which is true.

If you had public read receipts disabled, this is a mistake, and would send a public read receipt. Instead, what we want to do is wait until the updated value is emitted and use it to decide whether we want to send a public or private read receipt.

Motivation and context

Fixes #6836.

Tests

  • In advanced settings, disable 'share presence'.
  • Go into any room, the open a user's profile.
  • Go back to the chat screen.
  • From another account, check your public read receipt hasn't updated.

Previously, you'd see a public read receipt sent by mistake here.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 15

Checklist

  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

When returning to the chat screen from the room details one or a member's profile, `TimelineEvent.OnScrollFinished` will be called immediately, and this would read the default value for `isSendPublicReadReceiptsEnabled`, which is `true`.

If you had public read receipts disabled, this is a mistake, and would send a public read receipt. Instead, what we want to do is wait until the updated value is emitted and use it to decide whether we want to send a public or private read receipt.
@jmartinesp jmartinesp requested a review from a team as a code owner May 21, 2026 15:43
@jmartinesp jmartinesp requested review from bmarty and removed request for a team May 21, 2026 15:43
@jmartinesp jmartinesp added the PR-Bugfix For bug fix label May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/VfAyLv

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.25%. Comparing base (00efd9a) to head (3a7f478).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6838      +/-   ##
===========================================
- Coverage    81.25%   81.25%   -0.01%     
===========================================
  Files         2652     2652              
  Lines        74373    74366       -7     
  Branches      9641     9640       -1     
===========================================
- Hits         60432    60425       -7     
  Misses       10381    10381              
  Partials      3560     3560              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Bugfix For bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read receipt is sent when you view somebody's profile with presence sharing disabled

1 participant