@@ -40,12 +40,13 @@ import { WIDGET_LAYOUT_EVENT_TYPE } from "./stores/widgets/WidgetLayoutStore";
40
40
import { RightPanelPhases } from "./stores/right-panel/RightPanelStorePhases" ;
41
41
import defaultDispatcher from "./dispatcher/dispatcher" ;
42
42
import { RoomSettingsTab } from "./components/views/dialogs/RoomSettingsDialog" ;
43
- import AccessibleButton , { ButtonEvent } from "./components/views/elements/AccessibleButton" ;
43
+ import AccessibleButton from "./components/views/elements/AccessibleButton" ;
44
44
import RightPanelStore from "./stores/right-panel/RightPanelStore" ;
45
45
import { highlightEvent , isLocationEvent } from "./utils/EventUtils" ;
46
46
import { ElementCall } from "./models/Call" ;
47
47
import { textForVoiceBroadcastStoppedEvent , VoiceBroadcastInfoEventType } from "./voice-broadcast" ;
48
48
import { getSenderName } from "./utils/event/getSenderName" ;
49
+ import PosthogTrackers from "./PosthogTrackers.ts" ;
49
50
50
51
function getRoomMemberDisplayname ( client : MatrixClient , event : MatrixEvent , userId = event . getSender ( ) ) : string {
51
52
const roomId = event . getRoomId ( ) ;
@@ -563,6 +564,7 @@ function textForPowerEvent(event: MatrixEvent, client: MatrixClient): (() => str
563
564
}
564
565
565
566
const onPinnedMessagesClick = ( ) : void => {
567
+ PosthogTrackers . trackInteraction ( "PinnedMessageStateEventClick" ) ;
566
568
RightPanelStore . instance . setCard ( { phase : RightPanelPhases . PinnedMessages } , false ) ;
567
569
} ;
568
570
@@ -590,7 +592,10 @@ function textForPinnedEvent(event: MatrixEvent, client: MatrixClient, allowJSX:
590
592
a : ( sub ) => (
591
593
< AccessibleButton
592
594
kind = "link_inline"
593
- onClick = { ( e : ButtonEvent ) => highlightEvent ( roomId , messageId ) }
595
+ onClick = { ( ) => {
596
+ PosthogTrackers . trackInteraction ( "PinnedMessageStateEventClick" ) ;
597
+ highlightEvent ( roomId , messageId ) ;
598
+ } }
594
599
>
595
600
{ sub }
596
601
</ AccessibleButton >
@@ -623,7 +628,10 @@ function textForPinnedEvent(event: MatrixEvent, client: MatrixClient, allowJSX:
623
628
a : ( sub ) => (
624
629
< AccessibleButton
625
630
kind = "link_inline"
626
- onClick = { ( e : ButtonEvent ) => highlightEvent ( roomId , messageId ) }
631
+ onClick = { ( ) => {
632
+ PosthogTrackers . trackInteraction ( "PinnedMessageStateEventClick" ) ;
633
+ highlightEvent ( roomId , messageId ) ;
634
+ } }
627
635
>
628
636
{ sub }
629
637
</ AccessibleButton >
0 commit comments