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: messages_controller.rb
    path of file: ./repos/vets-api/modules/my_health/app/controllers/my_health/v1
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module MyHealth
  module V1
    class MessagesController < SMController
      inc
    
      def thread
        message_id = params[:id].try(:to_i)
        resource = if params[:full_body] == 'true'
                     # returns full body of message including attachments attributes
                     client.get_full_messages_for_thread(message_id)
                   else
                     client.get_messages_for_thread(message_id)
                   end