another hack
This commit is contained in:
parent
91d940376f
commit
9bdde0d9af
1 changed files with 7 additions and 1 deletions
|
|
@ -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) }
|
||||
|
|
|
|||
Loading…
Reference in a new issue