Introduce group posts

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-07-09 17:24:28 +02:00
parent bec1c69d4b
commit 9c9f1385fb
249 changed files with 11886 additions and 5023 deletions

View File

@@ -3,8 +3,8 @@ defmodule Mobilizon.GraphQL.API.Comments do
API for Comments.
"""
alias Mobilizon.Conversations.Comment
alias Mobilizon.Actors.Actor
alias Mobilizon.Discussions.Comment
alias Mobilizon.Federation.ActivityPub
alias Mobilizon.Federation.ActivityPub.Activity
@@ -19,7 +19,7 @@ defmodule Mobilizon.GraphQL.API.Comments do
end
def update_comment(%Comment{} = comment, args) do
ActivityPub.update(:comment, comment, args, true)
ActivityPub.update(comment, args, true)
end
@doc """
@@ -27,8 +27,8 @@ defmodule Mobilizon.GraphQL.API.Comments do
Deletes a comment from an actor
"""
@spec delete_comment(Comment.t()) :: {:ok, Activity.t(), Comment.t()} | any
def delete_comment(%Comment{} = comment) do
ActivityPub.delete(comment, true)
@spec delete_comment(Comment.t(), Actor.t()) :: {:ok, Activity.t(), Comment.t()} | any
def delete_comment(%Comment{} = comment, %Actor{} = actor) do
ActivityPub.delete(comment, actor, true)
end
end