1
0
mirror of https://github.com/element-hq/element-web.git synced 2025-11-29 21:23:11 +03:00

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

View File

@@ -85,6 +85,7 @@ import { shouldShowComponent } from "../../customisations/helpers/UIComponents";
import { UIComponent } from "../../settings/UIFeature";
import { UPDATE_EVENT } from "../../stores/AsyncStore";
import PosthogTrackers from "../../PosthogTrackers";
import { ViewRoomPayload } from "../../dispatcher/payloads/ViewRoomPayload";
interface IProps {
space: Room;
@@ -865,9 +866,10 @@ export default class SpaceRoomView extends React.PureComponent<IProps, IState> {
private goToFirstRoom = async () => {
if (this.state.firstRoomId) {
defaultDispatcher.dispatch({
defaultDispatcher.dispatch<ViewRoomPayload>({
action: Action.ViewRoom,
room_id: this.state.firstRoomId,
_trigger: undefined, // other
});
return;
}