From 638a0cb31b5dd3c0131035c19c14e0ac709a9a2e Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 19 Aug 2011 14:11:52 +0100 Subject: Added note-ability (fixes 1146) Removed threaded notifications cos we don't need em. (ftw!) --- lib/mauve/person.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/mauve/person.rb') diff --git a/lib/mauve/person.rb b/lib/mauve/person.rb index 64ed07e..e52b644 100644 --- a/lib/mauve/person.rb +++ b/lib/mauve/person.rb @@ -176,10 +176,14 @@ module Mauve return true end + + # FIXME current_alerts is very slow. So much so it slows everything + # down. A lot. result = NotificationCaller.new( self, alert, - current_alerts, + [], + # current_alerts, {:is_suppressed => @suppressed, :was_suppressed => was_suppressed, } ).instance_eval(&__send__(level)) @@ -202,8 +206,12 @@ module Mauve return false end + # # Returns the subset of current alerts that are relevant to this Person. # + # This is currently very CPU intensive, and slows things down a lot. So + # I've commented it out when sending notifications. + # def current_alerts Alert.all_raised.select do |alert| my_last_update = AlertChanged.first(:person => username, :alert_id => alert.id) -- cgit v1.2.1