Add pending

This commit is contained in:
Owen
2026-01-16 14:37:06 -08:00
parent e2cbe11a5f
commit a126494c12
2 changed files with 13 additions and 0 deletions

View File

@@ -90,6 +90,18 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
return;
}
if (client.approvalState == "pending") {
logger.debug(
`Client ${client.clientId} approval is pending. Ignoring register.`
);
sendOlmError(
OlmErrorCodes.CLIENT_PENDING,
"Client approval is pending",
olm.olmId
);
return;
}
const [org] = await db
.select()
.from(orgs)