feat(reports): improve reportview and allow removing content + resolve report automatically
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -34,7 +34,10 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Reports do
|
||||
{:error, :event_not_found} -> nil
|
||||
end
|
||||
end)
|
||||
|> Enum.filter(& &1)
|
||||
|> Enum.filter(fn event ->
|
||||
is_struct(event) and
|
||||
Enum.member?([event.organizer_actor_id, event.attributed_to_id], reported_actor.id)
|
||||
end)
|
||||
|
||||
comments =
|
||||
Discussions.list_comments_by_actor_and_ids(
|
||||
|
||||
@@ -67,7 +67,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Report do
|
||||
{:ok, _, %Report{} = report} ->
|
||||
{:ok, report}
|
||||
|
||||
error ->
|
||||
_error ->
|
||||
{:error, dgettext("errors", "Error while saving report")}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user