Add outgoin federation to twitter api.
authorRoger Braun <roger@rogerbraun.net>
Sat, 22 Apr 2017 10:08:20 +0000 (12:08 +0200)
committerRoger Braun <roger@rogerbraun.net>
Sat, 22 Apr 2017 10:08:20 +0000 (12:08 +0200)
Doesn't really belong there, find a different place for it. Should
federate on every activity insertion.

lib/pleroma/web/twitter_api/twitter_api.ex

index 1053120c4f50a3b5c64db933149c2c3d211c5699..0f84cffbd8bd8459ea43fec6d677043adad036b3 100644 (file)
@@ -66,7 +66,9 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
                end
 
     with {:ok, activity} <- ActivityPub.insert(activity) do
-      add_conversation_id(activity)
+      {:ok, activity} = add_conversation_id(activity)
+      Pleroma.Web.Websub.publish(Pleroma.Web.OStatus.feed_path(user), user, activity)
+      {:ok, activity}
     end
   end