View Source Mobilizon.Discussions.Comment (Mobilizon v4.1.0-alpha.1)

Represents an actor comment (for instance on an event or on a group).

Summary

Functions

Checks whether an comment can be managed.

Returns the id of the first comment in the discussion or conversation.

Types

@type t() :: %Mobilizon.Discussions.Comment{
  __meta__: term(),
  actor: Mobilizon.Actors.Actor.t(),
  actor_id: term(),
  attributed_to: Mobilizon.Actors.Actor.t(),
  attributed_to_id: term(),
  conversation: term(),
  conversation_id: term(),
  deleted_at: term(),
  discussion: term(),
  discussion_id: term(),
  event: Mobilizon.Events.Event.t(),
  event_id: term(),
  id: integer(),
  in_reply_to_comment: t(),
  in_reply_to_comment_id: term(),
  inserted_at: term(),
  is_announcement: term(),
  language: String.t(),
  local: boolean(),
  media: [Mobilizon.Medias.Media.t()],
  mentions: [Mobilizon.Mention.t()],
  origin_comment: t(),
  origin_comment_id: term(),
  published_at: term(),
  replies: term(),
  tags: [Mobilizon.Events.Tag.t()],
  text: String.t(),
  total_replies: term(),
  updated_at: term(),
  url: String.t(),
  uuid: Ecto.UUID.t(),
  visibility: atom()
}

Functions

Link to this function

can_be_managed_by?(comment, actor_id)

View Source
@spec can_be_managed_by?(t(), integer() | String.t()) :: boolean()

Checks whether an comment can be managed.

Link to this function

delete_changeset(comment)

View Source
@spec delete_changeset(t()) :: Ecto.Changeset.t()
@spec get_thread_id(t()) :: integer()

Returns the id of the first comment in the discussion or conversation.

Link to this function

update_changeset(comment, attrs)

View Source