The operations of a room's comments document (Issho.Engine.Comments),
for a LiveView, an agent's participant, or your own code to commit:
ada = Issho.Identity.new(%{id: "user:ada", name: "Ada"})
{op, %{thread: thread}} = Issho.Comments.Ops.start(ada, place, "Should this go first?")
{:ok, _} = Issho.Live.transact(room, Issho.Comments.document(room), [op])A new comment is its author's, as their identity says it (author/1),
at the server's time: the comments document's hook holds it to who
commits it.
Summary
Functions
A comment's author, as an identity says it: its key, name, kind, avatar and colour, and the key and name of whom it acts for.
A deletion of one's own comment.
An edit of one's own comment.
A thread at another place (its component's content moved).
A reaction to a comment.
A thread reopened.
A reply in a thread: {op, %{thread: id, comment: id}}.
A thread resolved.
A thread at a place, with its first comment: {op, %{thread: id, comment: id}}.
A reaction taken back.
Functions
@spec author(Issho.Identity.t()) :: map()
A comment's author, as an identity says it: its key, name, kind, avatar and colour, and the key and name of whom it acts for.
A deletion of one's own comment.
An edit of one's own comment.
A thread at another place (its component's content moved).
A reaction to a comment.
A thread reopened.
A reply in a thread: {op, %{thread: id, comment: id}}.
A thread resolved.
A thread at a place, with its first comment: {op, %{thread: id, comment: id}}.
A reaction taken back.