summaryrefslogtreecommitdiff
path: root/lib/matrix_app_service/adapter/user.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/matrix_app_service/adapter/user.ex')
-rw-r--r--lib/matrix_app_service/adapter/user.ex14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/matrix_app_service/adapter/user.ex b/lib/matrix_app_service/adapter/user.ex
new file mode 100644
index 0000000..92b9d96
--- /dev/null
+++ b/lib/matrix_app_service/adapter/user.ex
@@ -0,0 +1,14 @@
+defmodule MatrixAppService.Adapter.User do
+ @moduledoc """
+ Behaviour for a module that handles users that the application service has
+ reserved.
+ """
+
+ @doc """
+ Responds to a user query by Matrix ID. If the user exists, implementations
+ should create the user (for instance by using
+ `MatrixAppService.Client.register/1`) then return `:ok`. If the user
+ doesn't exist, they sould return anything else.
+ """
+ @callback query_user(String.t()) :: :ok | Any
+end