1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Trigger join room actions properly

This commit is contained in:
Germain Souquet
2021-05-24 14:34:06 +01:00
parent d6bc1861ae
commit b5295b03ce
5 changed files with 72 additions and 44 deletions

View File

@@ -34,6 +34,7 @@ import { isJoinedOrNearlyJoined } from "./utils/membership";
import { VIRTUAL_ROOM_EVENT_TYPE } from "./CallHandler";
import SpaceStore from "./stores/SpaceStore";
import { makeSpaceParentEvent } from "./utils/space";
import { Action } from "./dispatcher/actions"
// we define a number of interfaces which take their names from the js-sdk
/* eslint-disable camelcase */
@@ -243,7 +244,8 @@ export default function createRoom(opts: IOpts): Promise<string | null> {
// We also failed to join the room (this sets joining to false in RoomViewStore)
dis.dispatch({
action: 'join_room_error',
action: Action.JoinRoomError,
roomId,
});
console.error("Failed to create room " + roomId + " " + err);
let description = _t("Server may be unavailable, overloaded, or you hit a bug.");