added an authenticated room websocket for messages

This commit is contained in:
2025-12-15 19:51:31 +01:00
parent 22c187e4ee
commit 4d939f611d
4 changed files with 85 additions and 15 deletions

View File

@@ -15,3 +15,7 @@ export function sendMessage(roomUuid: string, content: string) {
})
}
export async function getWsToken(roomUuid: string): Promise<string> {
const data = await apiFetch<{ token: string }>(`/ws/issue-token/rooms/${roomUuid}`);
return data.token;
}