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:
parent
f6478f111a
commit
2943db1072
3 changed files with 33 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue