You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-04 11:51:45 +03:00 
			
		
		
		
	Trigger join room actions properly
This commit is contained in:
		@@ -22,6 +22,7 @@ import SdkConfig from './SdkConfig';
 | 
			
		||||
import {MatrixClientPeg} from "./MatrixClientPeg";
 | 
			
		||||
import {sleep} from "./utils/promise";
 | 
			
		||||
import RoomViewStore from "./stores/RoomViewStore";
 | 
			
		||||
import { Action } from "./dispatcher/actions";
 | 
			
		||||
 | 
			
		||||
// polyfill textencoder if necessary
 | 
			
		||||
import * as TextEncodingUtf8 from 'text-encoding-utf-8';
 | 
			
		||||
@@ -265,7 +266,7 @@ interface ICreateRoomEvent extends IEvent {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
interface IJoinRoomEvent extends IEvent {
 | 
			
		||||
    key: "join_room";
 | 
			
		||||
    key: Action.JoinRoom;
 | 
			
		||||
    dur: number; // how long it took to join (until remote echo)
 | 
			
		||||
    segmentation: {
 | 
			
		||||
        room_id: string; // hashed
 | 
			
		||||
@@ -858,7 +859,7 @@ export default class CountlyAnalytics {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public trackRoomJoin(startTime: number, roomId: string, type: IJoinRoomEvent["segmentation"]["type"]) {
 | 
			
		||||
        this.track<IJoinRoomEvent>("join_room", { type }, roomId, {
 | 
			
		||||
        this.track<IJoinRoomEvent>(Action.JoinRoom, { type }, roomId, {
 | 
			
		||||
            dur: CountlyAnalytics.getTimestamp() - startTime,
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user