deliver to pubsubhubbub

This commit is contained in:
Benjamin Neff 2016-05-27 03:36:29 +02:00
parent 9ce9b4bcd0
commit 7db9d7733c

View file

@ -3,6 +3,7 @@ module Diaspora
class Dispatcher class Dispatcher
class Public < Dispatcher class Public < Dispatcher
def deliver_to_services def deliver_to_services
deliver_to_hub if object.instance_of?(StatusMessage)
# TODO: pubsubhubbub, relay # TODO: pubsubhubbub, relay
super super
end end
@ -25,6 +26,11 @@ module Diaspora
entity entity
) )
end 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 end
end end