Switch to using stable values for threads (#8019)

This commit is contained in:
Germain 2022-03-11 09:04:22 +00:00 committed by GitHub
parent d38a1fa201
commit 21d3cb08a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 49 additions and 47 deletions

View file

@ -15,9 +15,9 @@ limitations under the License.
*/
import { IContent, MatrixEvent } from "matrix-js-sdk/src/models/event";
import { RelationType } from "matrix-js-sdk/src/@types/event";
import sanitizeHtml from "sanitize-html";
import escapeHtml from "escape-html";
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
import { PERMITTED_URL_SCHEMES } from "../HtmlUtils";
import { makeUserPermalink, RoomPermalinkCreator } from "./permalinks/Permalinks";
@ -163,7 +163,7 @@ export function makeReplyMixIn(ev?: MatrixEvent, inThread = false): RecursivePar
if (ev.isThreadRelation) {
mixin['m.relates_to'] = {
...mixin['m.relates_to'],
rel_type: RelationType.Thread,
rel_type: THREAD_RELATION_TYPE.name,
event_id: ev.threadRootId,
};
}