Add analytics for the ViewRoom action (#7666)

This commit is contained in:
Michael Telatynski
2022-02-10 14:29:55 +00:00
committed by GitHub
parent 20e9d0c159
commit 0d6ef76605
53 changed files with 332 additions and 159 deletions
+3 -1
View File
@@ -29,6 +29,7 @@ import Spinner from "../components/views/elements/Spinner";
import { isMetaSpace } from "../stores/spaces";
import SpaceStore from "../stores/spaces/SpaceStore";
import { Action } from "../dispatcher/actions";
import { ViewRoomPayload } from "../dispatcher/payloads/ViewRoomPayload";
/**
* Approximation of a membership status for a given room.
@@ -187,9 +188,10 @@ export async function leaveRoomBehaviour(roomId: string, retry = true, spinner =
SpaceStore.instance.activeSpace !== roomId &&
RoomViewStore.getRoomId() === roomId
) {
dis.dispatch({
dis.dispatch<ViewRoomPayload>({
action: Action.ViewRoom,
room_id: SpaceStore.instance.activeSpace,
_trigger: undefined, // other
});
} else {
dis.dispatch({ action: 'view_home_page' });