mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 19:44:30 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -25,10 +25,12 @@ export function validateSenderIdentity(ctx: MsgContext): string[] {
|
||||
}
|
||||
|
||||
if (senderUsername) {
|
||||
if (senderUsername.includes("@"))
|
||||
if (senderUsername.includes("@")) {
|
||||
issues.push(`SenderUsername should not include "@": ${senderUsername}`);
|
||||
if (/\s/.test(senderUsername))
|
||||
}
|
||||
if (/\s/.test(senderUsername)) {
|
||||
issues.push(`SenderUsername should not include whitespace: ${senderUsername}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx.SenderId != null && !senderId) {
|
||||
|
||||
Reference in New Issue
Block a user