diff options
author | href <href@random.sh> | 2021-09-04 05:41:09 +0200 |
---|---|---|
committer | href <href@random.sh> | 2021-09-04 05:41:09 +0200 |
commit | 735a8dd998b2c0aebde9c96daefc7aa2c223218e (patch) | |
tree | 4a165897c8557065dfab401455943524087f79af /lib/lsg_matrix/plug.ex | |
parent | chat_live improvements (diff) |
matrix appservice, puppet improvements
Diffstat (limited to 'lib/lsg_matrix/plug.ex')
-rw-r--r-- | lib/lsg_matrix/plug.ex | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/lsg_matrix/plug.ex b/lib/lsg_matrix/plug.ex new file mode 100644 index 0000000..5d5b603 --- /dev/null +++ b/lib/lsg_matrix/plug.ex @@ -0,0 +1,25 @@ +defmodule LSG.Matrix.Plug do + + defmodule Auth do + def init(state) do + state + end + + def call(conn, _) do + hs = Application.get_env(:matrix_app_service, :homeserver_token) + MatrixAppServiceWeb.AuthPlug.call(conn, hs) + end + end + + defmodule SetConfig do + def init(state) do + state + end + + def call(conn, _) do + config = Application.get_all_env(:matrix_app_service) + MatrixAppServiceWeb.SetConfigPlug.call(conn, config) + end + end + +end |