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
@@ -46,6 +46,7 @@ import { makeSpaceParentEvent } from "./utils/space";
import { Action } from "./dispatcher/actions";
import ErrorDialog from "./components/views/dialogs/ErrorDialog";
import Spinner from "./components/views/elements/Spinner";
import { ViewRoomPayload } from "./dispatcher/payloads/ViewRoomPayload";
// we define a number of interfaces which take their names from the js-sdk
/* eslint-disable camelcase */
@@ -257,7 +258,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
// state over multiple syncs so we can't atomically know when we have the
// entire thing.
if (opts.andView) {
dis.dispatch({
dis.dispatch<ViewRoomPayload>({
action: Action.ViewRoom,
room_id: roomId,
should_peek: false,
@@ -266,6 +267,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
// stream, if it hasn't already.
joining: true,
justCreatedOpts: opts,
_trigger: "Created",
});
}
CountlyAnalytics.instance.trackRoomCreate(startTime, roomId);