matrix-org / matrix-org/matrix-spec

Notifications: `room_one_to_one` push rule does not consider `m.direct` flag

Open
#850 5 comments 5 reactions 0 assignees View on GitHub
A-Push enhancement
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

I'm talking about the following four global push rules (`Underride Rules`):
- ".m.rule.encrypted_room_one_to_one"
- ".m.rule.room_one_to_one"
- ".m.rule.message"
- ".m.rule.encrypted"

For example these rules are visible in the parameters of the Element-web client:

![image](https://user-images.githubusercontent.com/8969772/123844465-5b0b3800-d913-11eb-8d1b-b354bc8acc0b.png)

For the end user point of view `one-to-one` refers to the DM (Direct Messages). The problem is the server ignores the actual `m.direct` event defined in the user account data. The server only considers the room members count during the notifications handling.

# Problem:
- If you have a room (not DM) with just 2 people inside it behave from the notification side like a DM
- If you have a DM with more than 2 people inside it behave from the notification side like a group chat

# How it should work for the end user point of view

When sending out notifications the direct message flag should be respected:

* When it is a "normal" room, use notification settings for group chats. No matter if 2, 3 or more people are in the room
* when it is a "DM flagged" room, use notification settings for DM

Contributor guide

Open the contributing guide

Research direction

Start by reading the four named global push rules—.m.rule.encrypted_room_one_to_one, .m.rule.room_one_to_one, .m.rule.message, and .m.rule.encrypted—and how the m.direct account-data event is defined. Done means the specification clearly requires notification handling to respect the direct-message flag rather than room member count, including both two-person rooms and multi-person DMs.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.