Fix explicit replies in threads (#8210)

This commit is contained in:
Michael Telatynski 2022-03-31 18:40:35 +01:00 committed by GitHub
parent f4c25e06cd
commit 17cfd45eb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 27 deletions

View file

@ -47,6 +47,7 @@ import { decorateStartSendingTime, sendRoundTripMetric } from "./sendTimePerform
import { TimelineRenderingType } from "./contexts/RoomContext";
import RoomViewStore from "./stores/RoomViewStore";
import { addReplyToMessageContent } from "./utils/Reply";
import { attachRelation } from "./components/views/rooms/SendMessageComposer";
const MAX_WIDTH = 800;
const MAX_HEIGHT = 600;
@ -585,10 +586,7 @@ export default class ContentMessages {
msgtype: "", // set later
};
if (relation) {
content["m.relates_to"] = relation;
}
attachRelation(content, relation);
if (replyToEvent) {
addReplyToMessageContent(content, replyToEvent, {
includeLegacyFallback: false,