1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Flag incoming DMs as such

* Add the 'is_direct' flag to rooms created for DMs
 * For invites, look for the DM flag when getting the DM user ID for a room
 * When accepting an invite, look for the flag and mark the room as a DM room if appropriate.
This commit is contained in:
David Baker
2016-09-12 18:32:44 +01:00
parent f6478f111a
commit 2943db1072
3 changed files with 33 additions and 0 deletions

View File

@@ -57,6 +57,9 @@ function createRoom(opts) {
if (opts.dmUserId && createOpts.invite === undefined) {
createOpts.invite = [opts.dmUserId];
}
if (opts.dmUserId && createOpts.is_direct === undefined) {
createOpts.is_direct = true;
}
// Allow guests by default since the room is private and they'd
// need an invite. This means clicking on a 3pid invite email can