Kantoor. Chat. Invite
(Kantoor v1.0.0)
A single-use link that lets a room's administrator bring in a person from another organization. Only the SHA-256 hash of the token is stored; the token itself is shown once, when the link is made, and never again. An invite is open until it is used, revoked or expired.
Summary
Functions
Where the invite stands at now: :revoked, :used, :expired or :open.
A used invite stays used even after its expiry, and a revoked one stays revoked.
Types
@type t() :: %Kantoor.Chat.Invite{ __meta__: term(), created_by: term(), created_by_id: term(), expires_at: term(), id: term(), inserted_at: term(), revoked_at: term(), revoked_by: term(), revoked_by_id: term(), room: term(), room_id: term(), token_hash: term(), updated_at: term(), used_at: term(), used_by: term(), used_by_id: term(), used_domain: term(), used_domain_id: term() }
Functions
@spec state(t(), DateTime.t()) :: :revoked | :used | :expired | :open
Where the invite stands at now: :revoked, :used, :expired or :open.
A used invite stays used even after its expiry, and a revoked one stays revoked.