Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

519 B
Raw Blame
import { revokeWorkspaceConnections } from "../../ws";

/** Closes the workspace's realtime connections for every listed user. */
export async function revokeWorkspaceAudience(
  userIds: string[],
  workspaceId: string,
  reason?: "archived",
) {
  await Promise.all(
    userIds.map((userId) =>
      revokeWorkspaceConnections(userId, workspaceId, {
        force: true,
        reason,
      }).catch((error) => {
        console.error("Failed to revoke workspace realtime access:", error);
      }),
    ),
  );
}