Implement is_falling_back in accordance to MSC3440 (#8055)

This commit is contained in:
Germain 2022-03-15 13:52:37 +00:00 committed by GitHub
parent cc9651089e
commit 2acc8fd18b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 23 deletions

View file

@ -63,7 +63,6 @@ import { getNestedReplyText, makeReplyMixIn } from '../../../utils/Reply';
interface IAddReplyOpts {
permalinkCreator?: RoomPermalinkCreator;
includeLegacyFallback?: boolean;
inThread?: boolean;
}
function addReplyToMessageContent(
@ -73,7 +72,7 @@ function addReplyToMessageContent(
includeLegacyFallback: true,
},
): void {
const replyContent = makeReplyMixIn(replyToEvent, opts.inThread);
const replyContent = makeReplyMixIn(replyToEvent);
Object.assign(content, replyContent);
if (opts.includeLegacyFallback) {
@ -133,7 +132,6 @@ export function createMessageContent(
addReplyToMessageContent(content, replyToEvent, {
permalinkCreator,
includeLegacyFallback: includeReplyLegacyFallback,
inThread: relation?.rel_type === THREAD_RELATION_TYPE.name,
});
}
@ -399,7 +397,6 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
addReplyToMessageContent(content, replyToEvent, {
permalinkCreator: this.props.permalinkCreator,
includeLegacyFallback: true,
inThread: this.props.relation?.rel_type === THREAD_RELATION_TYPE.name,
});
}
} else {