Add more todo in message.ts

pull/28217/head
Florian Duros 2022-10-10 17:38:41 +02:00
parent 6c7158197c
commit 70f57797f5
No known key found for this signature in database
GPG Key ID: 9700AA5870258A0B
1 changed files with 8 additions and 6 deletions

View File

@ -45,9 +45,7 @@ export function createMessageContent(
{ relation, replyToEvent, permalinkCreator, includeReplyLegacyFallback = true }:
Omit<SendMessageParams, 'roomContext' | 'mxClient'>,
): IContent {
const isEmote = false;
// TODO do somethings about emote ?
// TODO emote ?
/*const isEmote = containsEmote(model);
if (isEmote) {
@ -62,7 +60,9 @@ export function createMessageContent(
const body = message;
const content: IContent = {
msgtype: isEmote ? "m.emote" : "m.text",
// TODO emote
// msgtype: isEmote ? "m.emote" : "m.text",
msgtype: "m.text",
body: body,
};
@ -106,10 +106,12 @@ export function sendMessage(
isReply: Boolean(replyToEvent),
inThread: relation?.rel_type === THREAD_RELATION_TYPE.name,
};
if (posthogEvent.inThread) {
// TODO thread
/*if (posthogEvent.inThread) {
const threadRoot = room.findEventById(relation?.event_id);
posthogEvent.startsThread = threadRoot?.getThread()?.events.length === 1;
}
}*/
PosthogAnalytics.instance.trackEvent<ComposerEvent>(posthogEvent);
let content: IContent;