~fnux/telegram-client-elixir-demo

95379841fe9e2f0db43317ae5e04ddc8441940cc — Timothée Floure 5 years ago dbe1b89 master
Update telegram_mt to latest git version
3 files changed, 10 insertions(+), 4 deletions(-)

M lib/telegramclient/listener.ex
M mix.exs
M mix.lock
M lib/telegramclient/listener.ex => lib/telegramclient/listener.ex +7 -1
@@ 12,7 12,7 @@ defmodule TelegramClient.Listener do
    # Register on telegram_mt
    session_id = TelegramClient.Registry.get().session_id
    Session.set_client session_id, self()
    {:ok, nil}
    {:ok, session_id}
  end

  def handle_info({:tg, _session_id, msg}, state) do


@@ 20,6 20,12 @@ defmodule TelegramClient.Listener do
    {:noreply, state}
  end

  def handle_info(:auth_key_generated, state) do
    IO.puts "Authorization key generated !"

    {:noreply, state}
  end

  defp dispatch(msg) do
    name = if Map.get(msg, :name) == "rpc_result" do
      Map.get(msg, :result) |> Map.get(:name)

M mix.exs => mix.exs +1 -1
@@ 30,6 30,6 @@ defmodule TelegramClient.Mixfile do
  #
  # Type "mix help deps" for more examples and options
  defp deps do
    [{:telegram_mt, "~> 0.1.0-alpha"}]
    [{:telegram_mt, github: "fnux/telegram-mt-elixir"}]
  end
end

M mix.lock => mix.lock +2 -2
@@ 1,5 1,5 @@
%{"earmark": {:hex, :earmark, "1.2.0", "bf1ce17aea43ab62f6943b97bd6e3dc032ce45d4f787504e3adf738e54b42f3a", [:mix], []},
  "json": {:hex, :json, "1.0.0", "4824dadb01e14395f65e9d18da294d534326d7eed77996f3c22f74a9870179eb", [:mix], [{:earmark, ">= 0.0.0", [hex: :earmark, optional: false]}]},
  "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm"},
  "telegram_mt": {:hex, :telegram_mt, "0.1.0-alpha", "2379097f72039b5a1bce5c397d8dfe7883c6f8e6378948462095f99ac986f2f4", [:mix], [{:telegram_tl, "~> 0.2.0-beta", [hex: :telegram_tl, repo: "hexpm", optional: false]}], "hexpm"},
  "telegram_tl": {:hex, :telegram_tl, "0.2.0-beta", "1431a7b46c2631a6992fbc7c41650955d0029b1c74498b37c20b006d0ac92ed4", [:mix], [{:poison, "~> 3.1", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"}}
  "telegram_mt": {:git, "https://github.com/fnux/telegram-mt-elixir.git", "b32eb4abd502cad069682da112c8b5bb539e5281", []},
  "telegram_tl": {:git, "https://github.com/fnux/telegram-tl-elixir.git", "2a22570ebe09f011e5f36e0132dee42fd570328d", []}}