mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 16:24:58 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -21,7 +21,9 @@ export function registerSlackMessageEvents(params: {
|
||||
|
||||
ctx.app.event("message", async ({ event, body }: SlackEventMiddlewareArgs<"message">) => {
|
||||
try {
|
||||
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
||||
if (ctx.shouldDropMismatchedSlackEvent(body)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const message = event as SlackMessageEvent;
|
||||
if (message.subtype === "message_changed") {
|
||||
@@ -119,7 +121,9 @@ export function registerSlackMessageEvents(params: {
|
||||
|
||||
ctx.app.event("app_mention", async ({ event, body }: SlackEventMiddlewareArgs<"app_mention">) => {
|
||||
try {
|
||||
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
||||
if (ctx.shouldDropMismatchedSlackEvent(body)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const mention = event as SlackAppMentionEvent;
|
||||
await handleSlackMessage(mention as unknown as SlackMessageEvent, {
|
||||
|
||||
Reference in New Issue
Block a user