MS DG; actually fix the bug

This commit is contained in:
Maxwell Salzberg 2011-11-04 19:37:21 -07:00
parent a552fc80c0
commit cde12ec232

View file

@ -16,6 +16,8 @@ class Notification < ActiveRecord::Base
end end
def self.notify(recipient, target, actor) def self.notify(recipient, target, actor)
return false if recipient.person == actor #never notify someone if they are the actor, derp
if target.respond_to? :notification_type if target.respond_to? :notification_type
if note_type = target.notification_type(recipient, actor) if note_type = target.notification_type(recipient, actor)
if(target.is_a? Comment) || (target.is_a? Like) if(target.is_a? Comment) || (target.is_a? Like)