refactor: trim matrix helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 15:53:27 +01:00
parent 8f16079623
commit 0d7d1aa09c
2 changed files with 9 additions and 9 deletions

View File

@@ -21,13 +21,13 @@ const MATRIX_APPROVAL_REACTION_ORDER = [
"deny",
] as const satisfies readonly ExecApprovalReplyDecision[];
export type MatrixApprovalReactionBinding = {
type MatrixApprovalReactionBinding = {
decision: ExecApprovalReplyDecision;
emoji: string;
label: string;
};
export type MatrixApprovalReactionResolution = {
type MatrixApprovalReactionResolution = {
approvalId: string;
decision: ExecApprovalReplyDecision;
};
@@ -71,7 +71,7 @@ export function buildMatrixApprovalReactionHint(
return `React here: ${bindings.map((binding) => `${binding.emoji} ${binding.label}`).join(", ")}`;
}
export function resolveMatrixApprovalReactionDecision(
function resolveMatrixApprovalReactionDecision(
reactionKey: string,
allowedDecisions: readonly ExecApprovalReplyDecision[],
): ExecApprovalReplyDecision | null {

View File

@@ -18,14 +18,14 @@ import {
} from "./matrix/client/env-auth.js";
import { resolveMatrixAccountStorageRoot, resolveMatrixCredentialsPath } from "./storage-paths.js";
export type MatrixStoredCredentials = {
type MatrixStoredCredentials = {
homeserver: string;
userId: string;
accessToken: string;
deviceId?: string;
};
export type MatrixMigrationAccountTarget = {
type MatrixMigrationAccountTarget = {
accountId: string;
homeserver: string;
userId: string;
@@ -34,7 +34,7 @@ export type MatrixMigrationAccountTarget = {
storedDeviceId: string | null;
};
export type MatrixLegacyFlatStoreTarget = MatrixMigrationAccountTarget & {
type MatrixLegacyFlatStoreTarget = MatrixMigrationAccountTarget & {
selectionNote?: string;
};
@@ -64,7 +64,7 @@ function resolveMatrixFlatStoreSelectionNote(
);
}
export function resolveMatrixMigrationConfigFields(params: {
function resolveMatrixMigrationConfigFields(params: {
cfg: OpenClawConfig;
env: NodeJS.ProcessEnv;
accountId: string;
@@ -101,7 +101,7 @@ export function resolveMatrixMigrationConfigFields(params: {
};
}
export function loadStoredMatrixCredentials(
function loadStoredMatrixCredentials(
env: NodeJS.ProcessEnv,
accountId: string,
): MatrixStoredCredentials | null {
@@ -135,7 +135,7 @@ export function loadStoredMatrixCredentials(
}
}
export function credentialsMatchResolvedIdentity(
function credentialsMatchResolvedIdentity(
stored: MatrixStoredCredentials | null,
identity: {
homeserver: string;