mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
refactor: remove redundant telegram conversions
This commit is contained in:
@@ -21,7 +21,7 @@ export function collectTelegramUnmentionedGroupIds(
|
||||
};
|
||||
}
|
||||
const hasWildcardUnmentionedGroups =
|
||||
Boolean(groups["*"]?.requireMention === false) && groups["*"]?.enabled !== false;
|
||||
groups["*"]?.requireMention === false && groups["*"]?.enabled !== false;
|
||||
const groupIds: string[] = [];
|
||||
let unresolvedGroups = 0;
|
||||
for (const [key, value] of Object.entries(groups)) {
|
||||
@@ -37,7 +37,7 @@ export function collectTelegramUnmentionedGroupIds(
|
||||
if (value.requireMention !== false) {
|
||||
continue;
|
||||
}
|
||||
const id = normalizeOptionalString(String(key)) ?? "";
|
||||
const id = normalizeOptionalString(key) ?? "";
|
||||
if (!id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export function resolveTelegramCustomCommands(params: {
|
||||
|
||||
for (let index = 0; index < entries.length; index += 1) {
|
||||
const entry = entries[index];
|
||||
const normalized = normalizeTelegramCommandName(String(entry?.command ?? ""));
|
||||
const normalized = normalizeTelegramCommandName(entry?.command ?? "");
|
||||
if (!normalized) {
|
||||
issues.push({
|
||||
index,
|
||||
@@ -78,7 +78,7 @@ export function resolveTelegramCustomCommands(params: {
|
||||
});
|
||||
continue;
|
||||
}
|
||||
const description = normalizeTelegramCommandDescription(String(entry?.description ?? ""));
|
||||
const description = normalizeTelegramCommandDescription(entry?.description ?? "");
|
||||
if (!description) {
|
||||
issues.push({
|
||||
index,
|
||||
|
||||
@@ -54,7 +54,7 @@ export async function collectTelegramSecurityAuditFindings(params: {
|
||||
() => [],
|
||||
);
|
||||
const storeHasWildcard = storeAllowFrom.some(
|
||||
(value) => (normalizeOptionalString(String(value)) ?? "") === "*",
|
||||
(value) => (normalizeOptionalString(value) ?? "") === "*",
|
||||
);
|
||||
const invalidTelegramAllowFromEntries = new Set<string>();
|
||||
collectInvalidTelegramAllowFromEntries({
|
||||
|
||||
Reference in New Issue
Block a user