Sha256: 03973c7be5ca562d8526a30cfebbc39d44302341ad502e4471542cebf0263930

Contents?: true

Size: 753 Bytes

Versions: 1

Compression:

Stored size: 753 Bytes

Contents

module TeleNotify
  module Controller
    def webhook
      if params[:message]
        user = TelegramUser.create( { telegram_id: params[:message][:from][:id],
                                      last_name: params[:message][:from][:last_name],
                                      first_name: params[:message][:from][:first_name] } )


        message = Message.create( { telegram_id: params[:message][:from][:id],
                                      text: params[:message][:text],
                                      last_name: params[:message][:from][:last_name],
                                      first_name: params[:message][:from][:first_name] } )

        


        render :nothing => true, :status => :ok
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
TelegemBot-0.1.1 lib/tele_notify/telegram_controller.rb