mirror of https://github.com/vector-im/riot-web
Add more todo in message.ts
parent
6c7158197c
commit
70f57797f5
|
@ -45,9 +45,7 @@ export function createMessageContent(
|
||||||
{ relation, replyToEvent, permalinkCreator, includeReplyLegacyFallback = true }:
|
{ relation, replyToEvent, permalinkCreator, includeReplyLegacyFallback = true }:
|
||||||
Omit<SendMessageParams, 'roomContext' | 'mxClient'>,
|
Omit<SendMessageParams, 'roomContext' | 'mxClient'>,
|
||||||
): IContent {
|
): IContent {
|
||||||
const isEmote = false;
|
// TODO emote ?
|
||||||
|
|
||||||
// TODO do somethings about emote ?
|
|
||||||
|
|
||||||
/*const isEmote = containsEmote(model);
|
/*const isEmote = containsEmote(model);
|
||||||
if (isEmote) {
|
if (isEmote) {
|
||||||
|
@ -62,7 +60,9 @@ export function createMessageContent(
|
||||||
const body = message;
|
const body = message;
|
||||||
|
|
||||||
const content: IContent = {
|
const content: IContent = {
|
||||||
msgtype: isEmote ? "m.emote" : "m.text",
|
// TODO emote
|
||||||
|
// msgtype: isEmote ? "m.emote" : "m.text",
|
||||||
|
msgtype: "m.text",
|
||||||
body: body,
|
body: body,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -106,10 +106,12 @@ export function sendMessage(
|
||||||
isReply: Boolean(replyToEvent),
|
isReply: Boolean(replyToEvent),
|
||||||
inThread: relation?.rel_type === THREAD_RELATION_TYPE.name,
|
inThread: relation?.rel_type === THREAD_RELATION_TYPE.name,
|
||||||
};
|
};
|
||||||
if (posthogEvent.inThread) {
|
|
||||||
|
// TODO thread
|
||||||
|
/*if (posthogEvent.inThread) {
|
||||||
const threadRoot = room.findEventById(relation?.event_id);
|
const threadRoot = room.findEventById(relation?.event_id);
|
||||||
posthogEvent.startsThread = threadRoot?.getThread()?.events.length === 1;
|
posthogEvent.startsThread = threadRoot?.getThread()?.events.length === 1;
|
||||||
}
|
}*/
|
||||||
PosthogAnalytics.instance.trackEvent<ComposerEvent>(posthogEvent);
|
PosthogAnalytics.instance.trackEvent<ComposerEvent>(posthogEvent);
|
||||||
|
|
||||||
let content: IContent;
|
let content: IContent;
|
||||||
|
|
Loading…
Reference in New Issue