Consolidate the messages into the same enum

This commit is contained in:
Owen
2026-01-17 11:41:10 -08:00
parent 888f5f8bb6
commit ce632a25cf
11 changed files with 85 additions and 54 deletions

View File

@@ -5,8 +5,7 @@ import { OlmErrorCodes } from "../olm/error";
export async function sendTerminateClient(
clientId: number,
code: (typeof OlmErrorCodes)[keyof typeof OlmErrorCodes],
message: string,
error: (typeof OlmErrorCodes)[keyof typeof OlmErrorCodes],
olmId?: string | null
) {
if (!olmId) {
@@ -24,8 +23,8 @@ export async function sendTerminateClient(
await sendToClient(olmId, {
type: `olm/terminate`,
data: {
code,
message
code: error.code,
message: error.message
}
});
}