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.ex7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/matrix_app_service/client.ex b/lib/matrix_app_service/client.ex
index 8fbdc35..f7f9f63 100644
--- a/lib/matrix_app_service/client.ex
+++ b/lib/matrix_app_service/client.ex
@@ -21,6 +21,7 @@ defmodule MatrixAppService.Client do
* `:user_id`: user ID
* `:storage`: a `t:Polyjuice.Client.Storage.t/0`
"""
+ @impl true
def client(opts \\ []) do
base_url =
Keyword.get(opts, :base_url) ||
@@ -53,6 +54,7 @@ defmodule MatrixAppService.Client do
1. `options`: see `Polyjuice.Client.Room.create_room/2`
2. `client_options`: see `client/1`
"""
+ @impl true
def create_room(options \\ [], client_options \\ []) do
client(client_options)
|> Polyjuice.Client.Room.create_room(options)
@@ -66,6 +68,7 @@ defmodule MatrixAppService.Client do
2. `room_alias`: room alias
3. `client_options`: see `client/1`
"""
+ @impl true
def create_alias(room_id, room_alias, client_options \\ []) do
client(client_options)
|> Polyjuice.Client.Room.create_alias(room_id, room_alias)
@@ -79,6 +82,7 @@ defmodule MatrixAppService.Client do
2. `msg`: see `Polyjuice.Client.Room.send_message/3`
3. `client_options`: see `client/1`
"""
+ @impl true
def send_message(room_id, msg, client_options \\ []) do
client(client_options)
|> Polyjuice.Client.Room.send_message(room_id, msg)
@@ -97,6 +101,7 @@ defmodule MatrixAppService.Client do
`"guest"`
2. `client_options`: see `client/1`
"""
+ @impl true
def register(opts \\ [], client_options \\ []) do
default_opts = [
inhibit_login: true,
@@ -112,5 +117,5 @@ defmodule MatrixAppService.Client do
defdelegate get_data(client, id, key), to: Polyjuice.Client.Account
defdelegate get_profile(client, id), to: Polyjuice.Client.Profile
- defdelegate modify_display(client, id, name), to: Polyjuice.Client.Profile
+ defdelegate modify_displayname(client, id, name), to: Polyjuice.Client.Profile
end