summaryrefslogtreecommitdiff
path: root/lib/matrix_app_service/client.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/matrix_app_service/client.ex')
-rw-r--r--lib/matrix_app_service/client.ex16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/matrix_app_service/client.ex b/lib/matrix_app_service/client.ex
index 519f5a2..f166b88 100644
--- a/lib/matrix_app_service/client.ex
+++ b/lib/matrix_app_service/client.ex
@@ -11,4 +11,20 @@ defmodule MatrixAppService.Client do
storage: storage
}
end
+
+ def create_room(options) do
+ client_with_options(options)
+ |> Polyjuice.Client.Room.create_room(options)
+ end
+
+ def create_alias(room_id, room_alias, options \\ []) do
+ client_with_options(options)
+ |> Polyjuice.Client.Room.create_alias(room_id, room_alias)
+ end
+
+ defp client_with_options(options) do
+ user_id = Keyword.get(options, :user_id, nil)
+ storage = Keyword.get(options, :storage, nil)
+ client(user_id, storage)
+ end
end