Merge branch 'tusooa/3131-handle-report-from-deactivated-user' into 'develop'

Fix handling report from a deactivated user

Closes #3131

See merge request pleroma/pleroma!3915
This commit is contained in:
Haelwenn 2023-07-02 21:27:15 +00:00
commit a31a4c522f
3 changed files with 23 additions and 1 deletions

View file

@ -583,7 +583,7 @@ defmodule Pleroma.Web.CommonAPI do
end
def update_report_state(activity_id, state) do
with %Activity{} = activity <- Activity.get_by_id(activity_id) do
with %Activity{} = activity <- Activity.get_by_id(activity_id, filter: []) do
Utils.update_report_state(activity, state)
else
nil -> {:error, :not_found}