You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Add analytics for the ViewRoom action (#7666)
This commit is contained in:
committed by
GitHub
parent
20e9d0c159
commit
0d6ef76605
@@ -30,6 +30,7 @@ import {
|
||||
import dis from './dispatcher/dispatcher';
|
||||
import { Action } from './dispatcher/actions';
|
||||
import { ViewUserPayload } from './dispatcher/payloads/ViewUserPayload';
|
||||
import { ViewRoomPayload } from "./dispatcher/payloads/ViewRoomPayload";
|
||||
|
||||
export enum Type {
|
||||
URL = "url",
|
||||
@@ -116,9 +117,11 @@ function onUserClick(event: MouseEvent, userId: string) {
|
||||
|
||||
function onAliasClick(event: MouseEvent, roomAlias: string) {
|
||||
event.preventDefault();
|
||||
dis.dispatch({
|
||||
dis.dispatch<ViewRoomPayload>({
|
||||
action: Action.ViewRoom,
|
||||
room_alias: roomAlias,
|
||||
_trigger: "Timeline",
|
||||
_viaKeyboard: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user