threads - WIP

This commit is contained in:
Ajay Bura 2025-09-24 15:57:15 +05:30
parent 19096c3543
commit 1914606895
9 changed files with 312 additions and 116 deletions

View file

@ -8,6 +8,7 @@ import {
IPowerLevelsContent,
IPushRule,
IPushRules,
IThreadBundledRelationship,
JoinRule,
MatrixClient,
MatrixEvent,
@ -16,6 +17,7 @@ import {
RelationType,
Room,
RoomMember,
THREAD_RELATION_TYPE,
} from 'matrix-js-sdk';
import { CryptoBackend } from 'matrix-js-sdk/lib/common-crypto/CryptoBackend';
import { AccountDataEvent } from '../../types/matrix/accountData';
@ -551,3 +553,13 @@ export const guessPerfectParent = (
return perfectParent;
};
export const getEventThreadDetail = (
mEvent: MatrixEvent
): IThreadBundledRelationship | undefined => {
const details = mEvent.getServerAggregatedRelation<IThreadBundledRelationship>(
THREAD_RELATION_TYPE.name
);
return details;
};