Chat Effects & Commands in thread context (#7138)

This commit is contained in:
Germain 2021-11-18 12:47:11 +00:00 committed by GitHub
parent e549438e2a
commit 256c468c15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 108 additions and 31 deletions

View file

@ -492,7 +492,12 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
dis.dispatch({ action: "message_sent" });
CHAT_EFFECTS.forEach((effect) => {
if (containsEmoji(content, effect.emojis)) {
dis.dispatch({ action: `effects.${effect.command}` });
// For initial threads launch, chat effects are disabled
// see #19731
const isNotThread = this.props.relation?.rel_type !== RelationType.Thread;
if (!SettingsStore.getValue("feature_thread") || !isNotThread) {
dis.dispatch({ action: `effects.${effect.command}` });
}
}
});
if (SettingsStore.getValue("Performance.addSendMessageTimingMetadata")) {