mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:20:43 +00:00
refactor: trim mattermost helper exports
This commit is contained in:
@@ -5,10 +5,7 @@ import {
|
||||
createScopedChannelConfigAdapter,
|
||||
} from "openclaw/plugin-sdk/channel-config-helpers";
|
||||
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
|
||||
import {
|
||||
collectMattermostSlashCallbackPaths,
|
||||
resolveMattermostGatewayAuthBypassPaths,
|
||||
} from "./gateway-auth-bypass.js";
|
||||
import { resolveMattermostGatewayAuthBypassPaths } from "./gateway-auth-bypass.js";
|
||||
import {
|
||||
listMattermostAccountIds,
|
||||
resolveDefaultMattermostAccountId,
|
||||
@@ -38,7 +35,7 @@ export function normalizeMattermostAllowEntry(entry: string): string {
|
||||
);
|
||||
}
|
||||
|
||||
export function formatMattermostAllowEntry(entry: string): string {
|
||||
function formatMattermostAllowEntry(entry: string): string {
|
||||
const trimmed = entry.trim();
|
||||
if (!trimmed) {
|
||||
return "";
|
||||
@@ -50,7 +47,7 @@ export function formatMattermostAllowEntry(entry: string): string {
|
||||
return normalizeLowercaseStringOrEmpty(trimmed.replace(/^(mattermost|user):/i, ""));
|
||||
}
|
||||
|
||||
export { collectMattermostSlashCallbackPaths, resolveMattermostGatewayAuthBypassPaths };
|
||||
export { resolveMattermostGatewayAuthBypassPaths };
|
||||
|
||||
export const mattermostConfigAdapter = createScopedChannelConfigAdapter<ResolvedMattermostAccount>({
|
||||
sectionKey: "mattermost",
|
||||
|
||||
@@ -25,7 +25,7 @@ function isMattermostMutableAllowEntry(raw: string): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export const collectMattermostMutableAllowlistWarnings =
|
||||
const collectMattermostMutableAllowlistWarnings =
|
||||
createDangerousNameMatchingMutableAllowlistWarningCollector({
|
||||
channel: "mattermost",
|
||||
detector: isMattermostMutableAllowEntry,
|
||||
|
||||
Reference in New Issue
Block a user