mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 11:51:23 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -48,7 +48,9 @@ function resolveToken(params: {
|
||||
fallbackSource?: SlackTokenSource;
|
||||
}) {
|
||||
const explicit = resolveSlackBotToken(params.explicit);
|
||||
if (explicit) return explicit;
|
||||
if (explicit) {
|
||||
return explicit;
|
||||
}
|
||||
const fallback = resolveSlackBotToken(params.fallbackToken);
|
||||
if (!fallback) {
|
||||
logVerbose(
|
||||
@@ -161,7 +163,9 @@ export async function sendMessageSlack(
|
||||
const chunks = markdownChunks.flatMap((markdown) =>
|
||||
markdownToSlackMrkdwnChunks(markdown, chunkLimit, { tableMode }),
|
||||
);
|
||||
if (!chunks.length && trimmedMessage) chunks.push(trimmedMessage);
|
||||
if (!chunks.length && trimmedMessage) {
|
||||
chunks.push(trimmedMessage);
|
||||
}
|
||||
const mediaMaxBytes =
|
||||
typeof account.config.mediaMaxMb === "number"
|
||||
? account.config.mediaMaxMb * 1024 * 1024
|
||||
|
||||
Reference in New Issue
Block a user