Send terminate error messages

This commit is contained in:
Owen
2026-01-16 14:57:54 -08:00
parent a126494c12
commit 9114dd5992
11 changed files with 41 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ import { fromError } from "zod-validation-error";
import logger from "@server/logger";
import { rebuildClientAssociationsFromClient } from "@server/lib/rebuildClientAssociations";
import { sendTerminateClient } from "../client/terminate";
import { OlmErrorCodes } from "./error";
const paramsSchema = z
.object({
@@ -52,7 +53,7 @@ export async function archiveUserOlm(
.where(eq(clients.clientId, client.clientId));
await rebuildClientAssociationsFromClient(client, trx);
await sendTerminateClient(client.clientId, olmId);
await sendTerminateClient(client.clientId, OlmErrorCodes.TERMINATED_ARCHIVED, "Archived", olmId);
}
// Archive the OLM (set archived to true)