CommonAPI: Fail when user sends report with posts not visible to them
This commit is contained in:
parent
a4e480a636
commit
2b76243ec8
6 changed files with 124 additions and 3 deletions
|
|
@ -147,7 +147,7 @@ defmodule Pleroma.Web.CommonAPI.ActivityDraft do
|
|||
# TODO: Fix this quirk in FE and remove here and other affected places
|
||||
with %Activity{} = activity <- Activity.get_by_id(id),
|
||||
true <- Visibility.visible_for_user?(activity, draft.user),
|
||||
{:type, type} when type in ["Create", "Announce"] <- {:type, activity.data["type"]} do
|
||||
{_, type} when type in ["Create", "Announce"] <- {:type, activity.data["type"]} do
|
||||
%__MODULE__{draft | in_reply_to: activity}
|
||||
else
|
||||
nil ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue