refactor: trim mattermost helper exports · openclaw/openclaw@be3e104
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { formatInboundFromLabel as formatInboundFromLabelShared } from "openclaw/plugin-sdk/channel-inbound"; |
2 | | -import { createDedupeCache } from "openclaw/plugin-sdk/core"; |
3 | 2 | import { resolveThreadSessionKeys as resolveThreadSessionKeysShared } from "openclaw/plugin-sdk/routing"; |
4 | 3 | import { rawDataToString } from "openclaw/plugin-sdk/webhook-ingress"; |
5 | 4 | |
6 | | -export { createDedupeCache, rawDataToString }; |
| 5 | +export { rawDataToString }; |
7 | 6 | |
8 | 7 | export const formatInboundFromLabel = formatInboundFromLabelShared; |
9 | 8 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -110,12 +110,12 @@ type CreateMattermostConnectOnceOpts = {
|
110 | 110 | pongTimeoutMs?: number; |
111 | 111 | }; |
112 | 112 | |
113 | | -export const defaultMattermostWebSocketFactory: MattermostWebSocketFactory = (url) => { |
| 113 | +const defaultMattermostWebSocketFactory: MattermostWebSocketFactory = (url) => { |
114 | 114 | const agent = createDebugProxyWebSocketAgent(resolveDebugProxySettings()); |
115 | 115 | return new WebSocket(url, agent ? { agent } : undefined) as MattermostWebSocketLike; |
116 | 116 | }; |
117 | 117 | |
118 | | -export function parsePostedPayload( |
| 118 | +function parsePostedPayload( |
119 | 119 | payload: MattermostEventPayload, |
120 | 120 | ): { payload: MattermostEventPayload; post: MattermostPost } | null { |
121 | 121 | if (payload.event !== "posted") { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -220,7 +220,7 @@ export async function getMattermostCommand(
|
220 | 220 | /** |
221 | 221 | * Create a custom slash command on a Mattermost team. |
222 | 222 | */ |
223 | | -export async function createMattermostCommand( |
| 223 | +async function createMattermostCommand( |
224 | 224 | client: MattermostClient, |
225 | 225 | params: MattermostCommandCreate, |
226 | 226 | ): Promise<MattermostCommandResponse> { |
@@ -233,10 +233,7 @@ export async function createMattermostCommand(
|
233 | 233 | /** |
234 | 234 | * Delete a custom slash command. |
235 | 235 | */ |
236 | | -export async function deleteMattermostCommand( |
237 | | -client: MattermostClient, |
238 | | -commandId: string, |
239 | | -): Promise<void> { |
| 236 | +async function deleteMattermostCommand(client: MattermostClient, commandId: string): Promise<void> { |
240 | 237 | await client.request<Record<string, unknown>>(`/commands/${encodeURIComponent(commandId)}`, { |
241 | 238 | method: "DELETE", |
242 | 239 | }); |
@@ -245,7 +242,7 @@ export async function deleteMattermostCommand(
|
245 | 242 | /** |
246 | 243 | * Update an existing custom slash command. |
247 | 244 | */ |
248 | | -export async function updateMattermostCommand( |
| 245 | +async function updateMattermostCommand( |
249 | 246 | client: MattermostClient, |
250 | 247 | params: MattermostCommandUpdate, |
251 | 248 | ): Promise<MattermostCommandResponse> { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ import {
|
6 | 6 | type SecretTargetRegistryEntry, |
7 | 7 | } from "openclaw/plugin-sdk/channel-secret-basic-runtime"; |
8 | 8 | |
9 | | -export const secretTargetRegistryEntries = [ |
| 9 | +export const secretTargetRegistryEntries: SecretTargetRegistryEntry[] = [ |
10 | 10 | { |
11 | 11 | id: "channels.mattermost.accounts.*.botToken", |
12 | 12 | targetType: "channels.mattermost.accounts.*.botToken", |
@@ -29,7 +29,7 @@ export const secretTargetRegistryEntries = [
|
29 | 29 | includeInConfigure: true, |
30 | 30 | includeInAudit: true, |
31 | 31 | }, |
32 | | -] satisfies SecretTargetRegistryEntry[]; |
| 32 | +]; |
33 | 33 | |
34 | 34 | export function collectRuntimeConfigAssignments(params: { |
35 | 35 | config: { channels?: Record<string, unknown> }; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。