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:
John-Mason Shackelford
2026-04-08 14:51:21 -04:00
parent c82a8d38c0
commit e8c1349aac
@@ -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