Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 54ffce9

Browse files
authored
Add isLocation to ComposerEvent analytics events (#11187)
1 parent 90b572f commit 54ffce9

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/components/views/rooms/EditMessageComposer.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
308308
PosthogAnalytics.instance.trackEvent<ComposerEvent>({
309309
eventName: "Composer",
310310
isEditing: true,
311+
isLocation: false,
311312
inThread: !!editedEvent?.getThread(),
312313
isReply: !!editedEvent.replyEventId,
313314
});

src/components/views/rooms/SendMessageComposer.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
447447
const posthogEvent: ComposerEvent = {
448448
eventName: "Composer",
449449
isEditing: false,
450+
isLocation: false,
450451
isReply: !!this.props.replyToEvent,
451452
inThread: this.props.relation?.rel_type === THREAD_RELATION_TYPE.name,
452453
};

src/components/views/rooms/wysiwyg_composer/utils/message.ts

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export async function sendMessage(
6464
const posthogEvent: ComposerEvent = {
6565
eventName: "Composer",
6666
isEditing: false,
67+
isLocation: false,
6768
isReply: Boolean(replyToEvent),
6869
// TODO thread
6970
inThread: relation?.rel_type === THREAD_RELATION_TYPE.name,
@@ -199,6 +200,7 @@ export async function editMessage(
199200
PosthogAnalytics.instance.trackEvent<ComposerEvent>({
200201
eventName: "Composer",
201202
isEditing: true,
203+
isLocation: false,
202204
inThread: Boolean(editedEvent?.getThread()),
203205
isReply: Boolean(editedEvent.replyEventId),
204206
});

0 commit comments

Comments
 (0)