From 58abbcc058336c5329d628fa8b2595ef0504c053 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Thu, 15 Sep 2011 15:36:40 -0700 Subject: [PATCH] DG MS; activate dispatcher switch in Dispatcher; remove diasporahq blocker --- app/models/jobs/http_multi.rb | 2 -- lib/postzord/dispatcher.rb | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/models/jobs/http_multi.rb b/app/models/jobs/http_multi.rb index 3baff5ebb..ae9f8d47f 100644 --- a/app/models/jobs/http_multi.rb +++ b/app/models/jobs/http_multi.rb @@ -13,8 +13,6 @@ module Jobs MAX_RETRIES = 3 def self.perform(user_id, encoded_object_xml, person_ids, dispatcher_class_as_string, retry_count=0) - return true if user_id == '91842' #NOTE 09/08/11 blocking diapsorahqposts - user = User.find(user_id) people = Person.where(:id => person_ids) diff --git a/lib/postzord/dispatcher.rb b/lib/postzord/dispatcher.rb index 7cd8ddc04..8d5e5b0fa 100644 --- a/lib/postzord/dispatcher.rb +++ b/lib/postzord/dispatcher.rb @@ -15,11 +15,11 @@ class Postzord::Dispatcher raise 'this object does not respond_to? to_diaspora xml. try including Diaspora::Webhooks into your object' end - #if self.object_should_be_processed_as_public?(object) - # Postzord::Dispatcher::Public.new(user, object, opts) - #else + if self.object_should_be_processed_as_public?(object) + Postzord::Dispatcher::Public.new(user, object, opts) + else Postzord::Dispatcher::Private.new(user, object, opts) - #end + end end # @param object [Object] @@ -59,7 +59,7 @@ class Postzord::Dispatcher self.deliver_to_local(local_people) end - self.deliver_to_remote(remote_people) unless @sender.username == 'diasporahq' #NOTE: 09/08/11 this is temporary (~3days max) till we fix fanout in federation + self.deliver_to_remote(remote_people) end # @return [Array] Recipients of the object, minus any additional subscribers