Add analytics for the ViewRoom action (#7666)
This commit is contained in:
+3
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user