mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
fix: show meeting guests to members and hide the roster from guests (#1353)
This commit is contained in:
1 parent
ab43563247
commit
f896e121e2
14 files changed
+254
-19
No files matched your search
@@ -50,6 +50,7 @@ export function createFakeLive() {
|
||||
setRoomShareControl: (...args: unknown[]) => {
|
||||
calls.push(["setRoomShareControl", ...args]);
|
||||
},
|
||||
listGuests: () => [{ label: "Guest 1" }],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -264,6 +264,33 @@ describe("collab rooms", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("lists stage guests for members and lets only the host remove them", async () => {
|
||||
server = await startServer();
|
||||
const roomId = await roomWithBob(server);
|
||||
await present(server, roomId);
|
||||
|
||||
const detail = await server.request("GET", `/rooms/${roomId}`, {
|
||||
user: "bob",
|
||||
});
|
||||
expect(detail.body.guests).toEqual([{ label: "Guest 1" }]);
|
||||
expect(
|
||||
(
|
||||
await server.request("POST", `/rooms/${roomId}/guests/remove`, {
|
||||
user: "bob",
|
||||
})
|
||||
).status,
|
||||
).toBe(403);
|
||||
expect(
|
||||
(await server.request("POST", `/rooms/${roomId}/guests/remove`)).status,
|
||||
).toBe(200);
|
||||
expect(server.live.calls).toContainEqual([
|
||||
"disconnectParticipants",
|
||||
"sess-alice",
|
||||
expect.any(String),
|
||||
{ userId: null, reason: "The host removed the guests" },
|
||||
]);
|
||||
});
|
||||
|
||||
it("ends a one-off room for good and keeps a persistent one", async () => {
|
||||
server = await startServer();
|
||||
const oneOff = await roomWithBob(server);
|
||||
|
||||
Reference in new issue
Block a user