Skip to content

Fix 'Conversation label cannot be empty' error#6823

Merged
jmartinesp merged 1 commit into
developfrom
fix/conversation-labels-cannot-be-empty
May 20, 2026
Merged

Fix 'Conversation label cannot be empty' error#6823
jmartinesp merged 1 commit into
developfrom
fix/conversation-labels-cannot-be-empty

Conversation

@jmartinesp
Copy link
Copy Markdown
Member

@jmartinesp jmartinesp commented May 20, 2026

Content

Make sure we provide a non-blank room name or id to the shortcut info builder.

Motivation and context

This happens when building a ShortcutInfoCompat in DefaultNotificationConversationService.onSendMessage when the provided room name is not null but it's empty.

Fixes a rageshake: https://github.com/element-hq/element-x-android-rageshakes/issues/13220

Tests

To be honest, I'm not entirely sure how to reproduce this because an empty room name state event translates to a room with an Empty room name according to my tests, but I guess some users somehow bypassed this. Assuming you'd be able to do the same, the flow to test this would be:

  • Rename a room to a blank value like a single whitespace character.
  • Send a message to that room.
  • Check the app doesn't crash and the shortcut is created using the room id.

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

This happens when building a `ShortcutInfoCompat` in `DefaultNotificationConversationService.onSendMessage` when the provided room name is not null but it's empty.
@jmartinesp jmartinesp added the PR-Bugfix For bug fix label May 20, 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/reVb38

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.27%. Comparing base (52f1203) to head (ab28c59).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...rsations/DefaultNotificationConversationService.kt 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6823   +/-   ##
========================================
  Coverage    81.27%   81.27%           
========================================
  Files         2648     2648           
  Lines        74169    74170    +1     
  Branches      9619     9619           
========================================
+ Hits         60281    60282    +1     
  Misses       10341    10341           
  Partials      3547     3547           

☔ 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.

@jmartinesp jmartinesp marked this pull request as ready for review May 20, 2026 10:54
@jmartinesp jmartinesp requested a review from a team as a code owner May 20, 2026 10:54
@jmartinesp jmartinesp requested review from bmarty and removed request for a team May 20, 2026 10:54
Copy link
Copy Markdown
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jmartinesp jmartinesp merged commit 64d9336 into develop May 20, 2026
41 of 42 checks passed
@jmartinesp jmartinesp deleted the fix/conversation-labels-cannot-be-empty branch May 20, 2026 12:26
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.

2 participants