Exclude localhost from telegram messages.
This commit is contained in:
parent
7ea4dd1752
commit
377bf5b2de
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ defmodule UiWeb.MorseLive do
|
|||
end
|
||||
|
||||
def handle_event("toggle_morse", _value, %{assigns: %{ip: ip}} = socket) do
|
||||
if Morse.Server.in_progress?() do
|
||||
if Morse.Server.in_progress?() and ip != "127.0.0.1" do
|
||||
spawn fn -> Ui.TelegramBot.message("#{ip} pressed the button!") end
|
||||
end
|
||||
Morse.Server.toggle_morse()
|
||||
|
|
Loading…
Reference in a new issue