config: disable Websub and Salmon publisher modules
authorAriadne Conill <ariadne@dereferenced.org>
Thu, 17 Oct 2019 22:31:20 +0000 (22:31 +0000)
committerAriadne Conill <ariadne@dereferenced.org>
Fri, 18 Oct 2019 14:50:09 +0000 (14:50 +0000)
config/config.exs
config/description.exs
test/web/federator_test.exs

index f4d92102f70743f6f8d367eb977d11d0a073c7f8..d0766a6e2e63a6e00cf9938aded50e68d89076f2 100644 (file)
@@ -59,10 +59,6 @@ scheduled_jobs =
     _ -> []
   end
 
-scheduled_jobs =
-  scheduled_jobs ++
-    [{"0 */6 * * * *", {Pleroma.Web.Websub, :refresh_subscriptions, []}}]
-
 config :pleroma, Pleroma.Scheduler,
   global: true,
   overlap: true,
@@ -243,9 +239,7 @@ config :pleroma, :instance,
   federation_incoming_replies_max_depth: 100,
   federation_reachability_timeout_days: 7,
   federation_publisher_modules: [
-    Pleroma.Web.ActivityPub.Publisher,
-    Pleroma.Web.Websub,
-    Pleroma.Web.Salmon
+    Pleroma.Web.ActivityPub.Publisher
   ],
   allow_relay: true,
   rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
index b007cf69ca9a83097525d5da56012d8dd11f084d..571c64bc1189634da0f7d51055c84b1dcf25e77f 100644 (file)
@@ -581,9 +581,7 @@ config :pleroma, :config_description, [
         type: [:list, :module],
         description: "List of modules for federation publishing",
         suggestions: [
-          Pleroma.Web.ActivityPub.Publisher,
-          Pleroma.Web.Websub,
-          Pleroma.Web.Salmo
+          Pleroma.Web.ActivityPub.Publisher
         ]
       },
       %{
index 43a715706fd06424575a795b7ace49c641cf768f..bdaefdce13844bec83a9e75d3eaf4a1308c5ceaf 100644 (file)
@@ -111,93 +111,6 @@ defmodule Pleroma.Web.FederatorTest do
                all_enqueued(worker: PublisherWorker)
              )
     end
-
-    test "it federates only to reachable instances via Websub" do
-      user = insert(:user)
-      websub_topic = Pleroma.Web.OStatus.feed_path(user)
-
-      sub1 =
-        insert(:websub_subscription, %{
-          topic: websub_topic,
-          state: "active",
-          callback: "http://pleroma.soykaf.com/cb"
-        })
-
-      sub2 =
-        insert(:websub_subscription, %{
-          topic: websub_topic,
-          state: "active",
-          callback: "https://pleroma2.soykaf.com/cb"
-        })
-
-      dt = NaiveDateTime.utc_now()
-      Instances.set_unreachable(sub2.callback, dt)
-
-      Instances.set_consistently_unreachable(sub1.callback)
-
-      {:ok, _activity} = CommonAPI.post(user, %{"status" => "HI"})
-
-      expected_callback = sub2.callback
-      expected_dt = NaiveDateTime.to_iso8601(dt)
-
-      ObanHelpers.perform(all_enqueued(worker: PublisherWorker))
-
-      assert ObanHelpers.member?(
-               %{
-                 "op" => "publish_one",
-                 "params" => %{
-                   "callback" => expected_callback,
-                   "unreachable_since" => expected_dt
-                 }
-               },
-               all_enqueued(worker: PublisherWorker)
-             )
-    end
-
-    test "it federates only to reachable instances via Salmon" do
-      user = insert(:user)
-
-      _remote_user1 =
-        insert(:user, %{
-          local: false,
-          nickname: "nick1@domain.com",
-          ap_id: "https://domain.com/users/nick1",
-          info: %{salmon: "https://domain.com/salmon"}
-        })
-
-      remote_user2 =
-        insert(:user, %{
-          local: false,
-          nickname: "nick2@domain2.com",
-          ap_id: "https://domain2.com/users/nick2",
-          info: %{salmon: "https://domain2.com/salmon"}
-        })
-
-      remote_user2_id = remote_user2.id
-
-      dt = NaiveDateTime.utc_now()
-      Instances.set_unreachable(remote_user2.ap_id, dt)
-
-      Instances.set_consistently_unreachable("domain.com")
-
-      {:ok, _activity} =
-        CommonAPI.post(user, %{"status" => "HI @nick1@domain.com, @nick2@domain2.com!"})
-
-      expected_dt = NaiveDateTime.to_iso8601(dt)
-
-      ObanHelpers.perform(all_enqueued(worker: PublisherWorker))
-
-      assert ObanHelpers.member?(
-               %{
-                 "op" => "publish_one",
-                 "params" => %{
-                   "recipient_id" => remote_user2_id,
-                   "unreachable_since" => expected_dt
-                 }
-               },
-               all_enqueued(worker: PublisherWorker)
-             )
-    end
   end
 
   describe "Receive an activity" do