-
-
Notifications
You must be signed in to change notification settings - Fork 624
Description
To create a direct message room we need to call
client.createRoom({
is_direct: true,
invite: [userId],
visibility: "private"
})
This creates the room, but as per the matrix spec:
Both the inviting client and the invitee’s client should record the fact that the room is a direct chat by storing an m.direct event in the account data using /user/<user_id>/account_data/.
As far as I can tell, this isn't done automatically by matrix-js-sdk
.
Manual management is impossible for servers that configure auto-joining on invites. Without m.direct
update, it's impossible to tell which rooms are DM rooms. This might mean that this is a Bug report rather than a Feature request.
Describe the solution you'd like
When a user joins a DM room (one that was created with the above options), matrix-js-sdk
should make sure the m.direct
account data is correctly set as per the matrix docs.