diff options
author | Jordan Bracco <href@random.sh> | 2023-03-05 10:14:31 +0100 |
---|---|---|
committer | Jordan Bracco <href@random.sh> | 2023-03-05 10:14:31 +0100 |
commit | 53b9b921987e5e61a6149f46ef98671da7907043 (patch) | |
tree | ce23bf045ed78e981c39a77589bca572965e0ad9 /lib/telegram.ex | |
parent | link/image with pyerlai (tbc) (diff) |
More fixeswip/T77-nola-rename
Diffstat (limited to 'lib/telegram.ex')
-rw-r--r-- | lib/telegram.ex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/telegram.ex b/lib/telegram.ex index f2c9eca..b161b63 100644 --- a/lib/telegram.ex +++ b/lib/telegram.ex @@ -15,9 +15,12 @@ defmodule Nola.Telegram do @impl Telegram.ChatBot def init(chat_id) when chat_id < 0 do - {:ok, state} = Nola.TelegramRoom.init(chat_id) - {:ok, %{room_state: state}} + case Nola.TelegramRoom.init(chat_id) do + {:ok, state} -> {:ok, %{room_state: state}} + _ -> :ignore + end end + def init(chat_id) do Logger.info("Telegram session starting: #{chat_id}") account = Nola.Account.find_meta_account("telegram-id", chat_id) |