Display the list of spaces

This commit is contained in:
2025-11-24 16:05:01 +01:00
parent 0a37688116
commit 820b095be0
11 changed files with 218 additions and 21 deletions

View File

@@ -0,0 +1,27 @@
import { APIClient } from "../ApiClient";
import type { MatrixEvent } from "./MatrixApiEvent";
export interface Room {
id: string;
name?: string;
members: string[];
avatar?: string;
is_space?: boolean;
parents: string[];
number_unread_messages: number;
latest_event?: MatrixEvent;
}
export class MatrixApiRoom {
/**
* Get the list of joined rooms
*/
static async ListJoined(): Promise<Room[]> {
return (
await APIClient.exec({
method: "GET",
uri: "/matrix/room/joined",
})
).data;
}
}