Change from Telegram to Matrix for messaging

This commit is contained in:
Pim Kunis 2021-06-09 02:48:44 +02:00
parent 567248ea1f
commit e7706744a9
6 changed files with 72 additions and 39 deletions

View file

@ -17,11 +17,12 @@ defmodule UiWeb.MorseLive do
Logger.info("#{ip} pressed the button!")
if not Morse.Server.in_progress?() and ip_send_message?(ip) do
Logger.info("Sending Telegram message.")
spawn(fn -> Ui.TelegramBot.message("#{ip} pressed the button!") end)
Logger.info("Sending message.")
spawn(fn -> Ui.MessageBot.message("#{ip} pressed the button!") end)
end
Morse.Server.toggle_morse()
spawn(fn -> Ui.MessageBot.message("#{ip} pressed the button!") end)
#Morse.Server.toggle_morse()
{:noreply, socket}
end