mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 20:50:21 +00:00
fix(boundary): restore bluebubbles and matrix type seams
This commit is contained in:
@@ -6,10 +6,6 @@ import {
|
||||
resolveServicePrefixedAllowTarget,
|
||||
resolveServicePrefixedTarget,
|
||||
} from "openclaw/plugin-sdk/channel-targets";
|
||||
import {
|
||||
normalizeLowercaseStringOrEmpty,
|
||||
normalizeOptionalString,
|
||||
} from "openclaw/plugin-sdk/text-runtime";
|
||||
|
||||
export type BlueBubblesService = "imessage" | "sms" | "auto";
|
||||
|
||||
@@ -32,6 +28,18 @@ const SERVICE_PREFIXES: Array<{ prefix: string; service: BlueBubblesService }> =
|
||||
const CHAT_IDENTIFIER_UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
||||
const CHAT_IDENTIFIER_HEX_RE = /^[0-9a-f]{24,64}$/i;
|
||||
|
||||
function normalizeOptionalString(value: unknown): string | undefined {
|
||||
if (typeof value !== "string") {
|
||||
return undefined;
|
||||
}
|
||||
const trimmed = value.trim();
|
||||
return trimmed ? trimmed : undefined;
|
||||
}
|
||||
|
||||
function normalizeLowercaseStringOrEmpty(value: unknown): string {
|
||||
return normalizeOptionalString(value)?.toLowerCase() ?? "";
|
||||
}
|
||||
|
||||
function parseRawChatGuid(value: string): string | null {
|
||||
const trimmed = normalizeOptionalString(value);
|
||||
if (!trimmed) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
|
||||
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
||||
import type { PinnedDispatcherPolicy, SsrFPolicy } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { formatMatrixErrorMessage } from "./matrix/errors.js";
|
||||
import type { MatrixProbe } from "./matrix/probe.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
@@ -10,8 +11,8 @@ type ResolveMatrixAuth = (params: { cfg: CoreConfig; accountId?: string }) => Pr
|
||||
userId: string;
|
||||
deviceId?: string;
|
||||
allowPrivateNetwork?: boolean;
|
||||
ssrfPolicy?: unknown;
|
||||
dispatcherPolicy?: unknown;
|
||||
ssrfPolicy?: SsrFPolicy;
|
||||
dispatcherPolicy?: PinnedDispatcherPolicy;
|
||||
}>;
|
||||
|
||||
type ProbeMatrix = (params: {
|
||||
@@ -22,8 +23,8 @@ type ProbeMatrix = (params: {
|
||||
timeoutMs?: number;
|
||||
accountId?: string;
|
||||
allowPrivateNetwork?: boolean;
|
||||
ssrfPolicy?: unknown;
|
||||
dispatcherPolicy?: unknown;
|
||||
ssrfPolicy?: SsrFPolicy;
|
||||
dispatcherPolicy?: PinnedDispatcherPolicy;
|
||||
}) => Promise<MatrixProbe>;
|
||||
|
||||
type SendMessageMatrix = (
|
||||
|
||||
Reference in New Issue
Block a user