mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 03:51:25 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -54,8 +54,12 @@ vi.mock("./bot.js", () => ({
|
||||
const chatId = ctx.message.chat.id;
|
||||
const isGroup = ctx.message.chat.type !== "private";
|
||||
const text = ctx.message.text ?? ctx.message.caption ?? "";
|
||||
if (isGroup && !text.includes("@mybot")) return;
|
||||
if (!text.trim()) return;
|
||||
if (isGroup && !text.includes("@mybot")) {
|
||||
return;
|
||||
}
|
||||
if (!text.trim()) {
|
||||
return;
|
||||
}
|
||||
await api.sendMessage(chatId, `echo:${text}`, { parse_mode: "HTML" });
|
||||
};
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user