[Pleroma.Web.MastodonAPI.MastodonAPIController]: Add rights to initial_state
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Tue, 26 Jun 2018 18:48:35 +0000 (20:48 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Tue, 26 Jun 2018 18:48:35 +0000 (20:48 +0200)
Related to https://git.pleroma.social/pleroma/mastofe/issues/20

lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index dab255ee234e53df4ed1276a87293d8d333921a4..9d3f526c922b98a6d2329b2ddd10ebff3a232508 100644 (file)
@@ -868,6 +868,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
             reduce_motion: false,
             max_toot_chars: Keyword.get(@instance, :limit)
           },
+          rights: %{
+            delete_others_notice: !!user.info["is_moderator"]
+          },
           compose: %{
             me: "#{user.id}",
             default_privacy: "public",