You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Make local echo work for threads (#7157)
This commit is contained in:
@@ -20,7 +20,7 @@ import React from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { IEncryptedFile, IMediaEventInfo } from "./customisations/models/IMediaEventContent";
|
||||
import { IUploadOpts } from "matrix-js-sdk/src/@types/requests";
|
||||
import { MsgType } from "matrix-js-sdk/src/@types/event";
|
||||
import { MsgType, RelationType } from "matrix-js-sdk/src/@types/event";
|
||||
|
||||
import dis from './dispatcher/dispatcher';
|
||||
import * as sdk from './index';
|
||||
@@ -518,6 +518,7 @@ export default class ContentMessages {
|
||||
uploadAll = true;
|
||||
}
|
||||
}
|
||||
|
||||
promBefore = this.sendContentToRoom(file, roomId, relation, matrixClient, promBefore);
|
||||
}
|
||||
}
|
||||
@@ -649,7 +650,10 @@ export default class ContentMessages {
|
||||
return promBefore;
|
||||
}).then(function() {
|
||||
if (upload.canceled) throw new UploadCanceledError();
|
||||
const prom = matrixClient.sendMessage(roomId, content);
|
||||
const threadId = relation?.rel_type === RelationType.Thread
|
||||
? relation.event_id
|
||||
: null;
|
||||
const prom = matrixClient.sendMessage(roomId, threadId, content);
|
||||
if (SettingsStore.getValue("Performance.addSendMessageTimingMetadata")) {
|
||||
prom.then(resp => {
|
||||
sendRoundTripMetric(matrixClient, roomId, resp.event_id);
|
||||
|
||||
Reference in New Issue
Block a user