summaryrefslogtreecommitdiff
path: root/lib/lsg_telegram/telegram.ex
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2022-12-17 14:01:18 +0000
committerJordan Bracco <href@random.sh>2022-12-20 19:29:41 +0100
commit67754dc5366976b0f4300af2d1798baa81423df5 (patch)
treeea7d78652e52e8e347f1976c4b2777cd6565462f /lib/lsg_telegram/telegram.ex
parentNola rename cont. pt. 2. Refs T77. (diff)
Nola rename, cont. pt. 3. Refs T77.
`s/:lsg/:nola/g`
Diffstat (limited to 'lib/lsg_telegram/telegram.ex')
-rw-r--r--lib/lsg_telegram/telegram.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lsg_telegram/telegram.ex b/lib/lsg_telegram/telegram.ex
index ef5c3b8..1c6a9a9 100644
--- a/lib/lsg_telegram/telegram.ex
+++ b/lib/lsg_telegram/telegram.ex
@@ -8,7 +8,7 @@ defmodule Nola.Telegram do
def send_message(id, text, md2 \\ false) do
md = if md2, do: "MarkdownV2", else: "Markdown"
- token = Keyword.get(Application.get_env(:lsg, :telegram, []), :key)
+ token = Keyword.get(Application.get_env(:nola, :telegram, []), :key)
Telegram.Bot.ChatBot.Chat.Session.Supervisor.start_child(Nola.Telegram, id)
Telegram.Api.request(token, "sendMessage", chat_id: id, text: text, parse_mode: "Markdown")
end
@@ -135,7 +135,7 @@ defmodule Nola.Telegram do
{:ok, %HTTPoison.Response{status_code: 200, body: body}} <- HTTPoison.get(path),
<<smol_body::binary-size(20), _::binary>> = body,
{:ok, magic} <- GenMagic.Pool.perform(Nola.GenMagic, {:bytes, smol_body}),
- bucket = Application.get_env(:lsg, :s3, []) |> Keyword.get(:bucket),
+ bucket = Application.get_env(:nola, :s3, []) |> Keyword.get(:bucket),
ext = Path.extname(file["file_path"]),
s3path = "#{account.id}/#{file_unique_id}#{ext}",
Telegram.Api.request(t, "editMessageText", chat_id: chat_id, message_id: m_id, text: "*Uploading...*", reply_markup: %{}, parse_mode: "MarkdownV2"),