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: channels_messages_moves_controller.rb
    path of file: ./repos/discourse/plugins/chat/app/controllers/chat/api
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Chat::Api::ChannelsMessagesMovesController < Chat::Api::ChannelsController
  def create
    move_params = params.require(:move)
    move_params.require(:message_ids)
    move_params.require(:destination_channel_id)

    raise Discourse::InvalidAccess if !guardian.can_move_chat_messages?(channel_from_params)
    destinati
    
  def create
    move_params = params.require(:move)
    move_params.require(:message_ids)
    move_params.require(:destination_channel_id)

    raise Discourse::InvalidAccess if !guardian.can_move_chat_messages?(channel_from_params)
    destination_channel =
      Chat::ChannelFetcher.find_with_access_check(move_params[:destination_channel_id], guardian)

    begin
      message_ids = move_params[:message_ids].map(&:to_i)
      moved_messages =
        Chat::MessageMover.new(
          acting_user: current_user,
          source_channel: channel_from_params,
          message_ids: message_ids,
        ).move_to_channel(destination_channel)
    rescue Chat::MessageMover::NoMessagesFound, Chat::MessageMover::InvalidChannel => err
      return render_json_error(err.message)
    end