temporary fix to prevent DiapsoraHQ from killing Diasporg till we implemnt fanout

This commit is contained in:
Maxwell Salzberg 2011-09-08 10:24:41 -07:00
parent 2addd32274
commit 0c00947fec

View file

@ -35,7 +35,7 @@ class Postzord::Dispatch
self.deliver_to_local(local_people) self.deliver_to_local(local_people)
end end
self.deliver_to_remote(remote_people) 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
end end
self.deliver_to_services(opts[:url], opts[:services] || []) self.deliver_to_services(opts[:url], opts[:services] || [])
@object.after_dispatch(@sender) @object.after_dispatch(@sender)
@ -86,6 +86,7 @@ class Postzord::Dispatch
socket_to_users(users) socket_to_users(users)
end end
def notify_users(users) def notify_users(users)
Resque.enqueue(Job::NotifyLocalUsers, users.map{|u| u.id}, @object.class.to_s, @object.id, @object.author.id) Resque.enqueue(Job::NotifyLocalUsers, users.map{|u| u.id}, @object.class.to_s, @object.id, @object.author.id)
end end