mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-09-19 06:44:59 +09:00
style: Use bot? predicate instead of role comparison
Changed `message.creator.role == "bot"` to `message.creator.bot?` per Copilot code review. This is the idiomatic Rails pattern for enum checks and consistent with how other role checks are done in the codebase. Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -42,7 +42,7 @@ class Messages::ByBotsController < MessagesController
|
||||
creator: {
|
||||
id: message.creator.id,
|
||||
name: message.creator.name,
|
||||
is_bot: message.creator.role == "bot"
|
||||
is_bot: message.creator.bot?
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user