refactor: prune stale extension helpers · openclaw/openclaw@90554ea
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
File tree
mattermost/src/mattermost
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,6 @@ import path from "node:path";
|
2 | 2 | import type { |
3 | 3 | MatrixMessageAttachmentKind, |
4 | 4 | MatrixMessageAttachmentSummary, |
5 | | -MatrixMessageSummary, |
6 | 5 | } from "./actions/types.js"; |
7 | 6 | |
8 | 7 | const MATRIX_MEDIA_KINDS: Record<string, MatrixMessageAttachmentKind> = { |
@@ -134,12 +133,6 @@ export function formatMatrixMessageText(params: {
|
134 | 133 | return `${body}\n\n${marker}`; |
135 | 134 | } |
136 | 135 | |
137 | | -export function formatMatrixMessageSummaryText( |
138 | | -summary: Pick<MatrixMessageSummary, "body" | "attachment">, |
139 | | -): string | undefined { |
140 | | -return formatMatrixMessageText(summary); |
141 | | -} |
142 | | - |
143 | 136 | export function formatMatrixMediaUnavailableText(params: { |
144 | 137 | body?: string; |
145 | 138 | filename?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -55,10 +55,6 @@ export type PollStartSubtype = {
|
55 | 55 | answers: PollAnswer[]; |
56 | 56 | }; |
57 | 57 | |
58 | | -export type LegacyPollStartContent = { |
59 | | -"m.poll"?: PollStartSubtype; |
60 | | -}; |
61 | | - |
62 | 58 | export type PollStartContent = { |
63 | 59 | [M_POLL_START]?: PollStartSubtype; |
64 | 60 | [ORG_POLL_START]?: PollStartSubtype; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -62,29 +62,6 @@ export function normalizeMatrixMessagingTarget(raw: string): string | undefined
|
62 | 62 | return normalized || undefined; |
63 | 63 | } |
64 | 64 | |
65 | | -export function normalizeMatrixDirectoryUserId(raw: string): string | undefined { |
66 | | -const normalized = stripKnownPrefixes(raw, [MATRIX_PREFIX, USER_PREFIX]); |
67 | | -if (!normalized || normalized === "*") { |
68 | | -return undefined; |
69 | | -} |
70 | | -return isMatrixQualifiedUserId(normalized) ? `user:${normalized}` : normalized; |
71 | | -} |
72 | | - |
73 | | -export function normalizeMatrixDirectoryGroupId(raw: string): string | undefined { |
74 | | -const normalized = stripKnownPrefixes(raw, [MATRIX_PREFIX]); |
75 | | -if (!normalized || normalized === "*") { |
76 | | -return undefined; |
77 | | -} |
78 | | -const lowered = normalizeLowercaseStringOrEmpty(normalized); |
79 | | -if (lowered.startsWith(ROOM_PREFIX) || lowered.startsWith(CHANNEL_PREFIX)) { |
80 | | -return normalized; |
81 | | -} |
82 | | -if (normalized.startsWith("!")) { |
83 | | -return `room:${normalized}`; |
84 | | -} |
85 | | -return normalized; |
86 | | -} |
87 | | - |
88 | 65 | export function resolveMatrixDirectUserId(params: { |
89 | 66 | from?: string; |
90 | 67 | to?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -71,13 +71,6 @@ export function getSlashCommandState(accountId: string): SlashCommandAccountStat
|
71 | 71 | return accountStates.get(accountId) ?? null; |
72 | 72 | } |
73 | 73 | |
74 | | -/** |
75 | | - * Get all active slash command account states. |
76 | | - */ |
77 | | -export function getAllSlashCommandStates(): ReadonlyMap<string, SlashCommandAccountState> { |
78 | | -return accountStates; |
79 | | -} |
80 | | - |
81 | 74 | /** |
82 | 75 | * Activate slash commands for a specific account. |
83 | 76 | * Called from the monitor after bot connects. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -309,8 +309,3 @@ function safeHostForLog(url: string): string {
|
309 | 309 | return "invalid-url"; |
310 | 310 | } |
311 | 311 | } |
312 | | - |
313 | | -/** |
314 | | - * @deprecated Use `downloadMSTeamsAttachments` instead (supports all file types). |
315 | | - */ |
316 | | -export const downloadMSTeamsImageAttachments = downloadMSTeamsAttachments; |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。