Jido.Chat.MessageSubject (Jido Chat v1.2.0)

Copy Markdown View Source

Normalized subject for a resource-backed conversation.

Examples include an issue, a pull request, or a discussion. The adapter supplies the provider resource type and identifier. Core does not infer a subject from a room identifier.

Summary

Functions

Builds a message subject from serialized map data.

Creates a normalized message subject from atom-keyed or string-keyed input.

Returns the Zoi schema for MessageSubject.

Serializes a message subject into a plain map with a type marker.

Types

t()

@type t() :: %Jido.Chat.MessageSubject{
  id: binary(),
  metadata: map(),
  status: nil | nil | binary(),
  title: nil | nil | binary(),
  type: binary(),
  url: nil | nil | binary()
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds a message subject from serialized map data.

new(attrs)

@spec new(map()) :: t()

Creates a normalized message subject from atom-keyed or string-keyed input.

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for MessageSubject.

to_map(subject)

@spec to_map(t()) :: map()

Serializes a message subject into a plain map with a type marker.