another hack

This commit is contained in:
Maxwell Salzberg 2011-11-04 00:49:30 -07:00
parent 91d940376f
commit 9bdde0d9af

View file

@ -9,8 +9,14 @@ module Jobs
require File.join(Rails.root, 'app/models/notification')
def self.perform(user_ids, object_klass, object_id, person_id)
users = User.where(:id => user_ids)
object = object_klass.constantize.find_by_id(object_id)
#hax
return if (object.author.diaspora_handle == 'diasporahq@joindiaspora.com' || (object.respond_to?(:relayable?) && object.parent.author.diaspora_handle == 'diasporahq@joindiaspora.com'))
#end hax
users = User.where(:id => user_ids)
person = Person.find_by_id(person_id)
users.each{|user| Notification.notify(user, object, person) }