diff options
Diffstat (limited to 'lib/telegram/room.ex')
-rw-r--r-- | lib/telegram/room.ex | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/telegram/room.ex b/lib/telegram/room.ex index 8e95ca8..f3c3715 100644 --- a/lib/telegram/room.ex +++ b/lib/telegram/room.ex @@ -44,8 +44,8 @@ defmodule Nola.TelegramRoom do {:ok, tg_room = %{"network" => _net, "channel" => _chan}} -> tg_room {:error, :not_found} -> [net, chan] = String.split(chat["title"], "/", parts: 2) - {net, chan} = case IRC.Connection.get_network(net, chan) do - %IRC.Connection{} -> {net, chan} + {net, chan} = case Nola.Irc.Connection.get_network(net, chan) do + %Nola.Irc.Connection{} -> {net, chan} _ -> {nil, nil} end {:ok, _id, _rev} = Couch.post(@couch, %{"_id" => id, "network" => net, "channel" => nil}) @@ -95,14 +95,14 @@ defmodule Nola.TelegramRoom do def handle_update(%{"message" => %{"from" => from = %{"id" => user_id}, "text" => text}}, _token, state) do account = find_or_create_meta_account(from, state) - connection = IRC.Connection.get_network(state.net) + connection = Nola.Irc.Connection.get_network(state.net) IRC.send_message_as(account, state.net, state.chan, text, true) {:ok, state} end def handle_update(data = %{"message" => %{"from" => from = %{"id" => user_id}, "location" => %{"latitude" => lat, "longitude" => lon}}}, _token, state) do account = find_or_create_meta_account(from, state) - connection = IRC.Connection.get_network(state.net) + connection = Nola.Irc.Connection.get_network(state.net) IRC.send_message_as(account, state.net, state.chan, "@ #{lat}, #{lon}", true) {:ok, state} end @@ -172,7 +172,7 @@ defmodule Nola.TelegramRoom do do path = NolaWeb.Router.Helpers.url(NolaWeb.Endpoint) <> "/files/#{s3path}" txt = "#{type}: #{text}#{path}" - connection = IRC.Connection.get_network(state.net) + connection = Nola.Irc.Connection.get_network(state.net) IRC.send_message_as(account, state.net, state.chan, txt, true) else error -> |