mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 02:51:37 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -72,7 +72,9 @@ export async function routeReply(params: RouteReplyParams): Promise<RouteReplyRe
|
||||
const normalized = normalizeReplyPayload(payload, {
|
||||
responsePrefix,
|
||||
});
|
||||
if (!normalized) return { ok: true };
|
||||
if (!normalized) {
|
||||
return { ok: true };
|
||||
}
|
||||
|
||||
let text = normalized.text ?? "";
|
||||
let mediaUrls = (normalized.mediaUrls?.filter(Boolean) ?? []).length
|
||||
@@ -151,6 +153,8 @@ export async function routeReply(params: RouteReplyParams): Promise<RouteReplyRe
|
||||
export function isRoutableChannel(
|
||||
channel: OriginatingChannelType | undefined,
|
||||
): channel is Exclude<OriginatingChannelType, typeof INTERNAL_MESSAGE_CHANNEL> {
|
||||
if (!channel || channel === INTERNAL_MESSAGE_CHANNEL) return false;
|
||||
if (!channel || channel === INTERNAL_MESSAGE_CHANNEL) {
|
||||
return false;
|
||||
}
|
||||
return normalizeChannelId(channel) !== null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user