diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-04 15:57:21 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-04 15:57:21 +0100 |
commit | b3a4345e1359f77011bd312b1afeed8eb2b97c91 (patch) | |
tree | e97c6654abbc946f59ab3aa230b1ac55a06bc140 /lib/mauve/pop3_server.rb | |
parent | 02a177d8e744f7e084bc69d10a0b7f8fb7e3bd44 (diff) |
Fixed a couple of bugs in the packaging and the pop3 server
Diffstat (limited to 'lib/mauve/pop3_server.rb')
-rw-r--r-- | lib/mauve/pop3_server.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/mauve/pop3_server.rb b/lib/mauve/pop3_server.rb index b83e839..36a6cd2 100644 --- a/lib/mauve/pop3_server.rb +++ b/lib/mauve/pop3_server.rb @@ -276,13 +276,21 @@ module Mauve smtp = Mauve::Notifiers::Email::Default.new("TODO: why do I need to put this argument here?") alerts_seen = [] - AlertChanged.all(:person => self.user).each do |a| + # + # A maximum of the 100 most recent alerts. + # + AlertChanged.first(100, :person => self.user).each do |a| # # Not interested in alerts # next unless @level.nil? or a.level.to_s == @level # + # Only interested in alerts + # + next unless a.alert.is_a?(Mauve::Alert) + + # # Only one message per alert. # next if alerts_seen.include?([a.alert_id, a.update_type]) |