Use updated createThread method (#7670)

This commit is contained in:
Germain 2022-02-01 08:58:45 +00:00 committed by GitHub
parent 3e1a5f7021
commit 0e36f91d76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 10 deletions

View file

@ -88,7 +88,7 @@ async function getThreadTimelineSet(
const timelineSet = new EventTimelineSet(room, {});
Array.from(room.threads)
.sort(([, threadA], [, threadB]) => threadA.lastReply().getTs() - threadB.lastReply().getTs())
.sort(([, threadA], [, threadB]) => threadA.replyToEvent.getTs() - threadB.replyToEvent.getTs())
.forEach(([, thread]) => {
const isOwnEvent = thread.rootEvent.getSender() === client.getUserId();
if (filterType !== ThreadFilterType.My || isOwnEvent) {