Merge branch 'plug-if-unless-func-options-refactoring' into 'develop'
authorlain <lain@soykaf.club>
Wed, 6 May 2020 09:14:05 +0000 (09:14 +0000)
committerlain <lain@soykaf.club>
Wed, 6 May 2020 09:14:05 +0000 (09:14 +0000)
Refactoring of :if_func / :unless_func plug options

See merge request pleroma/pleroma!2446

1  2 
lib/pleroma/web/activity_pub/activity_pub_controller.ex

index f607931ab247bc2b6435cbbbba5a74d07bca6466,a909516beea6405c302d8a8ed1d2d2ed77e8eb2a..ab9d1e0b706c36b73260ec502d884dad083c1e54
@@@ -34,13 -34,12 +34,13 @@@ defmodule Pleroma.Web.ActivityPub.Activ
  
    plug(
      EnsureAuthenticatedPlug,
-     [unless_func: &FederatingPlug.federating?/0] when action not in @federating_only_actions
+     [unless_func: &FederatingPlug.federating?/1] when action not in @federating_only_actions
    )
  
 +  # Note: :following and :followers must be served even without authentication (as via :api)
    plug(
      EnsureAuthenticatedPlug
 -    when action in [:read_inbox, :update_outbox, :whoami, :upload_media, :following, :followers]
 +    when action in [:read_inbox, :update_outbox, :whoami, :upload_media]
    )
  
    plug(