Skip to content

Commit

Permalink
isRoomCreateEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Dec 20, 2024
1 parent daf4f72 commit 714042e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/events/m.room.create.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createEventBase, type EventBase } from "./eventBase";
import { createEventWithId } from "./utils/createSignedEvent";

interface RoomCreateEvent extends EventBase {
export interface RoomCreateEvent extends EventBase {
content: {
room_version: string;
creator: string;
Expand Down Expand Up @@ -43,3 +43,6 @@ export const roomCreateEvent = ({
});

export const createRoomCreateEvent = createEventWithId(roomCreateEvent);

export const isRoomCreateEvent = (event: EventBase): event is RoomCreateEvent =>
event.type === "m.room.create";

0 comments on commit 714042e

Please sign in to comment.