summaryrefslogtreecommitdiff
path: root/lib/matrix_app_service/adapter/user.ex
blob: 92b9d96aceb4a7133275335ef23c22a316dc2182 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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