You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: message_reactor.rb
    path of file: ./repos/discourse/plugins/chat/lib/chat
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Chat
  class MessageReactor
    ADD_REACTION = :add
    REMOVE_REACTION = :remove
    MAX_REACTIONS_LIMIT = 30

    def initialize(user, chat_channel)
      @user = user
      @chat_channel = chat_channel
      @guardian = Guardian.new(user)
    end

    def react!(message_id:, react_action:, emoji:)
      @guardian.ensure_can_join_chat_channel!(@chat_channel)
      @guardian.ensure_can_react!
      validate_channel_status!
      validate_reaction!(react_action, 
    
    def react!(message_id:, react_action:, emoji:)
      @guardian.ensure_can_join_chat_channel!(@chat_channel)
      @guardian.ensure_can_react!
      validate_channel_status!
      validate_reaction!(react_action, emoji)
      message = ensure_chat_message!(message_id)
      validate_max_reactions!(message, react_action, emoji)

      reaction = nil
      ActiveRecord::Base.transaction do
        enforce_channel_membership!
        reaction = create_reaction(message, react_action, emoji)
      end

      publish_reaction(message, react_action, emoji)

      reaction
    end