diff options
author | Sean King <seanking2919@protonmail.com> | 2022-12-21 23:35:39 -0700 |
---|---|---|
committer | Sean King <seanking2919@protonmail.com> | 2022-12-21 23:35:39 -0700 |
commit | 351b5a9df406a8a093d10dec3cdfa3bb2d709efb (patch) | |
tree | c3f4dc3f9dabd436072b8c69949147752d558f66 /lib | |
parent | 3bb78ac1527ef34806ce318dacbafdbbf46c040d (diff) | |
download | pleroma-351b5a9df406a8a093d10dec3cdfa3bb2d709efb.tar.gz pleroma-351b5a9df406a8a093d10dec3cdfa3bb2d709efb.zip |
Use crazy hack to finally get pleroma:report notifications not visible after revoking privileges
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/mastodon_api.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api.ex b/lib/pleroma/web/mastodon_api/mastodon_api.ex index c51230b92..98bf90af7 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api.ex @@ -65,7 +65,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPI do cast_params(params) |> Map.update(:include_types, [], fn include_types -> include_types end) options = - if "pleroma:report" not in options.include_types or + if ("pleroma:report" not in options.include_types and + User.privileged?(user, :reports_manage_reports)) or User.privileged?(user, :reports_manage_reports) do options else |