diff --git a/lib/diaspora/federation/dispatcher/public.rb b/lib/diaspora/federation/dispatcher/public.rb index 676b41670..82946e94e 100644 --- a/lib/diaspora/federation/dispatcher/public.rb +++ b/lib/diaspora/federation/dispatcher/public.rb @@ -3,6 +3,7 @@ module Diaspora class Dispatcher class Public < Dispatcher def deliver_to_services + deliver_to_hub if object.instance_of?(StatusMessage) # TODO: pubsubhubbub, relay super end @@ -25,6 +26,11 @@ module Diaspora entity ) end + + def deliver_to_hub + logger.debug "deliver to pubsubhubbub sender: #{sender.diaspora_handle}" + Workers::PublishToHub.perform_async(sender.atom_url) + end end end end