diff options
Diffstat (limited to 'lib/lsg_matrix')
-rw-r--r-- | lib/lsg_matrix/matrix.ex | 12 | ||||
-rw-r--r-- | lib/lsg_matrix/plug.ex | 2 | ||||
-rw-r--r-- | lib/lsg_matrix/room.ex | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/lsg_matrix/matrix.ex b/lib/lsg_matrix/matrix.ex index 49da6b2..9334816 100644 --- a/lib/lsg_matrix/matrix.ex +++ b/lib/lsg_matrix/matrix.ex @@ -1,4 +1,4 @@ -defmodule LSG.Matrix do +defmodule Nola.Matrix do require Logger alias Polyjuice.Client @@ -8,7 +8,7 @@ defmodule LSG.Matrix do @env Mix.env def dets(part) do - (LSG.data_path() <> "/matrix-#{to_string(part)}.dets") |> String.to_charlist() + (Nola.data_path() <> "/matrix-#{to_string(part)}.dets") |> String.to_charlist() end def setup() do @@ -62,13 +62,13 @@ defmodule LSG.Matrix do def application_childs() do import Supervisor.Spec [ - supervisor(LSG.Matrix.Room.Supervisor, [], [name: IRC.PuppetConnection.Supervisor]), + supervisor(Nola.Matrix.Room.Supervisor, [], [name: IRC.PuppetConnection.Supervisor]), ] end def after_start() do rooms = :dets.foldl(fn({id, _, _, _}, acc) -> [id | acc] end, [], dets(:rooms)) - for room <- rooms, do: LSG.Matrix.Room.start(room) + for room <- rooms, do: Nola.Matrix.Room.start(room) end def lookup_room(room) do @@ -130,7 +130,7 @@ defmodule LSG.Matrix do def query_alias(room_alias) do case lookup_or_create_room(room_alias) do {:ok, room_id} -> - LSG.Matrix.Room.start(room_id) + Nola.Matrix.Room.start(room_id) :ok error -> error end @@ -140,7 +140,7 @@ defmodule LSG.Matrix do def new_event(event = %MatrixAppService.Event{}) do Logger.debug("New matrix event: #{inspect event}") if event.room_id do - LSG.Matrix.Room.start_and_send_matrix_event(event.room_id, event) + Nola.Matrix.Room.start_and_send_matrix_event(event.room_id, event) end :noop end diff --git a/lib/lsg_matrix/plug.ex b/lib/lsg_matrix/plug.ex index c0c027f..c64ed11 100644 --- a/lib/lsg_matrix/plug.ex +++ b/lib/lsg_matrix/plug.ex @@ -1,4 +1,4 @@ -defmodule LSG.Matrix.Plug do +defmodule Nola.Matrix.Plug do defmodule Auth do def init(state) do diff --git a/lib/lsg_matrix/room.ex b/lib/lsg_matrix/room.ex index 72b02c4..c790760 100644 --- a/lib/lsg_matrix/room.ex +++ b/lib/lsg_matrix/room.ex @@ -1,6 +1,6 @@ -defmodule LSG.Matrix.Room do +defmodule Nola.Matrix.Room do require Logger - alias LSG.Matrix + alias Nola.Matrix alias Polyjuice.Client import Matrix, only: [client: 0, client: 1, user_name: 1, myself?: 1] @@ -12,7 +12,7 @@ defmodule LSG.Matrix.Room do end def start_child(room_id) do - spec = %{id: room_id, start: {LSG.Matrix.Room, :start_link, [room_id]}, restart: :transient} + spec = %{id: room_id, start: {Nola.Matrix.Room, :start_link, [room_id]}, restart: :transient} DynamicSupervisor.start_child(__MODULE__, spec) end |