summaryrefslogtreecommitdiff
path: root/lib/telegram/room.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/telegram/room.ex')
-rw-r--r--lib/telegram/room.ex6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/telegram/room.ex b/lib/telegram/room.ex
index f3c3715..ede939e 100644
--- a/lib/telegram/room.ex
+++ b/lib/telegram/room.ex
@@ -96,14 +96,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 = Nola.Irc.Connection.get_network(state.net)
- IRC.send_message_as(account, state.net, state.chan, text, true)
+ Nola.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 = Nola.Irc.Connection.get_network(state.net)
- IRC.send_message_as(account, state.net, state.chan, "@ #{lat}, #{lon}", true)
+ Nola.Irc.send_message_as(account, state.net, state.chan, "@ #{lat}, #{lon}", true)
{:ok, state}
end
@@ -173,7 +173,7 @@ defmodule Nola.TelegramRoom do
path = NolaWeb.Router.Helpers.url(NolaWeb.Endpoint) <> "/files/#{s3path}"
txt = "#{type}: #{text}#{path}"
connection = Nola.Irc.Connection.get_network(state.net)
- IRC.send_message_as(account, state.net, state.chan, txt, true)
+ Nola.Irc.send_message_as(account, state.net, state.chan, txt, true)
else
error ->
Telegram.Api.request(token, "sendMessage", chat_id: chat_id, text: "File upload failed, sorry.")