Merge branch 'develop' into feature/activitypub
authorlain <lain@soykaf.club>
Thu, 8 Mar 2018 11:37:06 +0000 (12:37 +0100)
committerlain <lain@soykaf.club>
Thu, 8 Mar 2018 11:37:06 +0000 (12:37 +0100)
1  2 
config/config.exs
lib/pleroma/user.ex
lib/pleroma/web/federator/federator.ex
lib/pleroma/web/router.ex
test/user_test.exs

Simple merge
Simple merge
index 8d93e1ea631b4ca5aa4e71310e71ba9b5d4f1c9c,59fb5cd6b123fdd03a74f61bf425a3aab65bee8e..520ac4a8ceb1819159af4d7a573b89e88a0340c9
@@@ -228,31 -231,25 +231,36 @@@ defmodule Pleroma.Web.Router d
      get "/objects/:uuid", OStatus.OStatusController, :object
      get "/activities/:uuid", OStatus.OStatusController, :activity
      get "/notice/:id", OStatus.OStatusController, :notice
      get "/users/:nickname/feed", OStatus.OStatusController, :feed
      get "/users/:nickname", OStatus.OStatusController, :feed_redirect
-     post "/users/:nickname/salmon", OStatus.OStatusController, :salmon_incoming
-     post "/push/hub/:nickname", Websub.WebsubController, :websub_subscription_request
-     get "/push/subscriptions/:id", Websub.WebsubController, :websub_subscription_confirmation
-     post "/push/subscriptions/:id", Websub.WebsubController, :websub_incoming
+     if @federating do
+       post "/users/:nickname/salmon", OStatus.OStatusController, :salmon_incoming
+       post "/push/hub/:nickname", Websub.WebsubController, :websub_subscription_request
+       get "/push/subscriptions/:id", Websub.WebsubController, :websub_subscription_confirmation
+       post "/push/subscriptions/:id", Websub.WebsubController, :websub_incoming
+     end
    end
  
-   scope "/", Pleroma.Web.ActivityPub do
-     pipe_through :activitypub
-     post "/users/:nickname/inbox", ActivityPubController, :inbox
-     post "/inbox", ActivityPubController, :inbox
-   end
 +  pipeline :activitypub do
 +    plug :accepts, ["activity+json"]
 +    plug Pleroma.Web.Plugs.HTTPSignaturePlug
 +  end
 +
-   scope "/.well-known", Pleroma.Web do
-     pipe_through :well_known
+   if @federating do
++    scope "/", Pleroma.Web.ActivityPub do
++      pipe_through :activitypub
++      post "/users/:nickname/inbox", ActivityPubController, :inbox
++      post "/inbox", ActivityPubController, :inbox
++    end
 +
+     scope "/.well-known", Pleroma.Web do
+       pipe_through :well_known
  
-     get "/host-meta", WebFinger.WebFingerController, :host_meta
-     get "/webfinger", WebFinger.WebFingerController, :webfinger
+       get "/host-meta", WebFinger.WebFingerController, :host_meta
+       get "/webfinger", WebFinger.WebFingerController, :webfinger
+     end
    end
  
    scope "/", Pleroma.Web.MastodonAPI do
Simple merge