Sha256: ac3244d4e21f4fd4ab4b59548ecb8770894d6dade40b3ba5aef803adda53e537
Contents?: true
Size: 427 Bytes
Versions: 1
Compression:
Stored size: 427 Bytes
Contents
module TelegramNotifications module Controller def webhook if params[:message] user = TelegramUser.create( { telegram_id: params[:message][:from][:id], first_name: params[:message][:from][:first_name] } ) if user user.send_message("Notifications are now active. To cancel, stop this bot in Telegram.") end render :nothing => true, :status => :ok end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
telegram_notifications-0.0.1 | lib/telegram_notifications/telegram_controller.rb |