36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import type { IContent } from "../../models/event.ts";
|
|
import type { RelationType } from "../../types.ts";
|
|
import { type RtcSlotApplicationContent, type Transport } from "../types.ts";
|
|
/**
|
|
* Represents the current form of MSC4143, which uses sticky events to store membership.
|
|
*/
|
|
export interface RtcMembershipData {
|
|
"slot_id": string;
|
|
"member": {
|
|
user_id: string;
|
|
device_id: string;
|
|
id: string;
|
|
};
|
|
"m.relates_to"?: {
|
|
event_id: string;
|
|
rel_type: RelationType.Reference;
|
|
};
|
|
"application": RtcSlotApplicationContent;
|
|
"transports": {
|
|
published: Transport[];
|
|
can_subscribe: string[];
|
|
};
|
|
"versions": string[];
|
|
"msc4354_sticky_key"?: string;
|
|
"sticky_key"?: string;
|
|
}
|
|
/**
|
|
* Validates that `data` matches the format expected by MSC4143.
|
|
* @param data The event content.
|
|
* @param sender The sender of the event.
|
|
* @returns true if `data` is valid RtcMembershipData
|
|
* @throws {MatrixRTCMembershipParseError} if the content is not valid
|
|
*/
|
|
export declare const checkRtcMembershipData: (data: IContent, sender: string) => data is RtcMembershipData;
|
|
export declare function computeRtcIdentityRaw(userId: string, deviceId: string, memberId: string): Promise<string>;
|
|
//# sourceMappingURL=rtc.d.ts.map
|