Merge branch 'develop' into dtluna/pleroma-feature/unfollow-activity
[akkoma] / lib / pleroma / web / federator / federator.ex
index 69ba7ed7f3ffae30a5f16ba12107729631bbdd88..ab3313de103711632d89507ebc2df6f033c82ec1 100644 (file)
@@ -5,6 +5,7 @@ defmodule Pleroma.Web.Federator do
   require Logger
 
   @websub Application.get_env(:pleroma, :websub)
+  @ostatus Application.get_env(:pleroma, :ostatus)
   @max_jobs 10
 
   def start_link do
@@ -28,6 +29,11 @@ defmodule Pleroma.Web.Federator do
     @websub.verify(websub)
   end
 
+  def handle(:incoming_doc, doc) do
+    Logger.debug("Got document, trying to parse")
+    @ostatus.handle_incoming(doc)
+  end
+
   def handle(type, payload) do
     Logger.debug(fn -> "Unknown task: #{type}" end)
     {:error, "Don't know what do do with this"}