Skip to content

Feature/per room notification channels#7145

Open
PolynomialDivision wants to merge 6 commits into
element-hq:developfrom
PolynomialDivision:feature/per-room-notification-channels
Open

Feature/per room notification channels#7145
PolynomialDivision wants to merge 6 commits into
element-hq:developfrom
PolynomialDivision:feature/per-room-notification-channels

Conversation

@PolynomialDivision

@PolynomialDivision PolynomialDivision commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Content

Automatically creates a per-room notification channel the first time a room notifies you, grouped under new "Private chats"/"Rooms" categories, so any room can appear as an Android Conversation and be marked Priority.

Motivation and context

You can prioritize certain chats and Element-X is closer integrated in the Android Conversation system.

Screenshots / GIFs

image

Tests

  • Install the updated apk
  • Go to Settings->Apps->Element-X->Notifications
  • Select a Conversation and select it as Priority or similar

Tested devices

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

Checklist

  • I am aware of the etiquette.
  • 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

@CLAassistant

CLAassistant commented Jul 2, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:

  • If your pull request adds a feature or modifies the UI, this should have an equivalent pull request in the Element X iOS repo unless it only affects an Android-only behaviour or is behind a disabled feature flag, since we need parity in both clients to consider a feature done. It will also need to be approved by our product and design teams before being merged, so it's usually a good idea to discuss the changes in a Github issue first and then start working on them once the approach has been validated.
  • Your branch should be based on origin/develop, at least when it was created.
  • The title of the PR will be used for release notes, so it needs to describe the change visible to the user.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

@PolynomialDivision PolynomialDivision marked this pull request as ready for review July 4, 2026 07:04
@PolynomialDivision PolynomialDivision requested a review from a team as a code owner July 4, 2026 07:04
@PolynomialDivision PolynomialDivision requested review from ganfra and removed request for a team July 4, 2026 07:04
@PolynomialDivision PolynomialDivision force-pushed the feature/per-room-notification-channels branch from 6767740 to 639cef1 Compare July 4, 2026 07:06
@PolynomialDivision PolynomialDivision marked this pull request as draft July 4, 2026 15:26
@PolynomialDivision PolynomialDivision force-pushed the feature/per-room-notification-channels branch from 3d73fe6 to 26c9c3f Compare July 4, 2026 22:50
@PolynomialDivision PolynomialDivision marked this pull request as ready for review July 5, 2026 07:27
@PolynomialDivision PolynomialDivision force-pushed the feature/per-room-notification-channels branch from 26c9c3f to 7de8a60 Compare July 6, 2026 08:33
Add a RoomNotificationChannelManager that creates room-scoped Android
notification channels for noisy room notifications.

Channels are grouped as Private chats or Rooms, skip silent notifications,
respect PIN privacy by falling back to the shared channel, and preserve the
shared noisy channel sound. The manager also prunes stale unmodified
channels.
Route notification creation through RoomNotificationChannelManager.

Reuse the existing conversation lifecycle hooks to delete room channels when
rooms or sessions disappear, and to clear them when PIN privacy is enabled.
Refresh a room shortcut when the first incoming non-thread notification is
received, not only when the user sends a message.

This gives room channels an Android conversation shortcut, icon, and avatar
before the user replies.
Split conversation updates into sent and received paths.

Sent text and attachment messages refresh the shortcut and create a room
channel only when the room notification mode is ALL_MESSAGES. Received
messages still only refresh the shortcut; notification creation handles
their per-event noisiness.
@PolynomialDivision PolynomialDivision force-pushed the feature/per-room-notification-channels branch from 7de8a60 to 5829297 Compare July 7, 2026 21:47
Add a room notification settings intent provider that opens the
Android channel settings for a Matrix room. Use the conversation id
on Android 11 and newer, fall back to channel settings on
Android 8-10, and app settings before channels exist.

Expose the entry point from the room notification settings screen
and cover the API-level intent behavior with focused tests.
Publish the room shortcut before opening Android notification settings
so the platform can resolve the conversation name and icon. Propagate
room avatar metadata into shortcuts, add fallback icons, and keep
shortcut and locus IDs aligned on room notifications.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants