This reverts commit655558cb95. Revert "MS DG; for real this time?" This reverts commitf85a047f6f. Revert "MS DG; actually fix the bug" This reverts commitcde12ec232. Revert "fix small commenting email bug #oops" This reverts commita552fc80c0. Revert "dont ban diasporahq stuff" This reverts commit2c12b94e67. Revert "Merge branch 'participants'" This reverts commit7417801886, reversing changes made toabd211ba72.
25 lines
817 B
Ruby
25 lines
817 B
Ruby
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
|
# licensed under the Affero General Public License version 3 or later. See
|
|
# the COPYRIGHT file.
|
|
|
|
module Jobs
|
|
class NotifyLocalUsers < Base
|
|
@queue = :receive_local
|
|
|
|
require File.join(Rails.root, 'app/models/notification')
|
|
|
|
def self.perform(user_ids, object_klass, object_id, person_id)
|
|
|
|
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) }
|
|
end
|
|
end
|
|
end
|