Fix integer-to-boolean cast in MessageRepository