Represents a user in a collaborative flow session.
Fields
:id- Unique user identifier (required):name- Display name (auto-generated if not provided):color- Cursor/highlight color as hex string (auto-generated if not provided)
Examples
iex> user = LiveFlow.Collaboration.User.new("user_123")
iex> user.id
"user_123"
iex> user = LiveFlow.Collaboration.User.new("user_123", name: "Alice", color: "#ef4444")
iex> user.name
"Alice"
Summary
Functions
Creates a new user with the given ID.
Returns the user data as a map suitable for Presence metadata.
Types
Functions
Creates a new user with the given ID.
Options:
:name- Display name. Defaults to "User N" where N is derived from the ID.:color- Hex color string. Defaults to a color deterministically chosen from the ID.
Returns the user data as a map suitable for Presence metadata.