diff options
author | Jordan Bracco <href@random.sh> | 2022-12-20 12:22:41 +0000 |
---|---|---|
committer | Jordan Bracco <href@random.sh> | 2022-12-20 19:29:42 +0100 |
commit | e78e8049334bea5336d87f0909d9e1a3876989e5 (patch) | |
tree | 88f1abcd9f814d0f8d68813029c99d89731cc66d /lib/telegram | |
parent | Re-reorg files a bit, lol, refs T77. (diff) |
Rename IRC.{Connection,PuppetConnection} to Nola.Irc.{Connection,PuppetConnection}, refs T77.
Diffstat (limited to 'lib/telegram')
-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 -> |