summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2021-09-04 13:01:58 +0200
committerJordan Bracco <href@random.sh>2021-09-04 13:01:58 +0200
commit5a4efc102f97abad6b60fab7bf761acef6acc78d (patch)
tree35dc5c5a8e2373fec4dd94a6d6408f39cfb4e9c2
parentadd put_data callback in ClientBehaviour (diff)
Support rooms with slashesmaster
-rw-r--r--lib/matrix_app_service_web/controllers/v1/room_controller.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/matrix_app_service_web/controllers/v1/room_controller.ex b/lib/matrix_app_service_web/controllers/v1/room_controller.ex
index e7af00d..9a09f96 100644
--- a/lib/matrix_app_service_web/controllers/v1/room_controller.ex
+++ b/lib/matrix_app_service_web/controllers/v1/room_controller.ex
@@ -7,6 +7,10 @@ defmodule MatrixAppServiceWeb.V1.RoomController do
@doc """
https://matrix.org/docs/spec/application_service/r0.1.2#get-matrix-app-v1-rooms-roomalias
"""
+ def query(conn, %{"room_alias" => room_alias}) when is_list(room_alias) do
+ query(conn, %{"room_alias" => Enum.join(room_alias, "/")})
+ end
+
def query(conn, %{"room_alias" => room_alias}) do
adapter =
conn.private[:room_adapter] ||