Pass room creation opts for new rooms into RoomView
This commit is contained in:
parent
483d56320c
commit
c8fe3f7676
4 changed files with 16 additions and 2 deletions
|
@ -75,7 +75,7 @@ interface ICreateOpts {
|
|||
power_level_content_override?: object;
|
||||
}
|
||||
|
||||
interface IOpts {
|
||||
export interface IOpts {
|
||||
dmUserId?: string;
|
||||
createOpts?: ICreateOpts;
|
||||
spinner?: boolean;
|
||||
|
@ -197,6 +197,9 @@ export default function createRoom(opts: IOpts): Promise<string | null> {
|
|||
// room has been created, so we race here with the client knowing that
|
||||
// the room exists, causing things like
|
||||
// https://github.com/vector-im/vector-web/issues/1813
|
||||
// Even if we were to block on the echo, servers tend to split the room
|
||||
// state over multiple syncs so we can't atomically know when we have the
|
||||
// entire thing.
|
||||
if (opts.andView) {
|
||||
dis.dispatch({
|
||||
action: 'view_room',
|
||||
|
@ -206,6 +209,7 @@ export default function createRoom(opts: IOpts): Promise<string | null> {
|
|||
// so we are expecting the room to come down the sync
|
||||
// stream, if it hasn't already.
|
||||
joining: true,
|
||||
justCreatedOpts: opts,
|
||||
});
|
||||
}
|
||||
CountlyAnalytics.instance.trackRoomCreate(startTime, roomId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue