You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Pass room creation opts for new rooms into RoomView
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user