Skip to content

Commit

Permalink
add Membership variations
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Dec 20, 2024
1 parent 7883b92 commit daf4f72
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/core/src/events/m.room.member.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { createEventBase, type EventBase } from "./eventBase";
import type { JoinRule } from "./m.room.join_rules";
import { createEventWithId } from "./utils/createSignedEvent";

type Membership = "join" | "invite";
type Membership = "join" | "invite" | "leave" | "knock" | "ban";

declare module "./eventBase" {
interface Events {
Expand All @@ -26,7 +27,19 @@ export interface RoomMemberEvent extends EventBase {
type: "m.room.member";
content: {
membership: Membership;
join_rule: JoinRule;
join_authorised_via_users_server?: string;
third_party_invite?: {
signed: {
mxid: string;
token: string;
signatures: {
[servername: string]: {
[protocol: string]: string;
};
};
};
};
};
state_key: string;
unsigned: {
Expand Down

0 comments on commit daf4f72

Please sign in to comment.