mobilizon/lib/mobilizon_web/api/comments.ex

20 lines
454 B
Elixir
Raw Normal View History

defmodule MobilizonWeb.API.Comments do
@moduledoc """
2019-09-22 16:26:23 +02:00
API for Comments.
"""
alias Mobilizon.Events.Comment
alias Mobilizon.Service.ActivityPub
alias Mobilizon.Service.ActivityPub.Activity
@doc """
Create a comment
Creates a comment from an actor and a status
"""
@spec create_comment(map()) ::
{:ok, Activity.t(), Comment.t()} | any()
def create_comment(args) do
ActivityPub.create(:comment, args, true)
end
end