aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/notifier.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-19 14:11:52 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-19 14:11:52 +0100
commit638a0cb31b5dd3c0131035c19c14e0ac709a9a2e (patch)
tree601104ed74c1bf8d9df6c8f629b8695f778fbf9d /lib/mauve/notifier.rb
parentcdd1b094b27960595a8750247c5b2f2576cd5872 (diff)
Added note-ability (fixes 1146)
Removed threaded notifications cos we don't need em. (ftw!)
Diffstat (limited to 'lib/mauve/notifier.rb')
-rw-r--r--lib/mauve/notifier.rb21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/mauve/notifier.rb b/lib/mauve/notifier.rb
index d660a54..4737c37 100644
--- a/lib/mauve/notifier.rb
+++ b/lib/mauve/notifier.rb
@@ -14,32 +14,22 @@ module Mauve
#
sz = Server.notification_buffer_size
- my_threads = []
-
+ # Thread.current[:notification_threads] ||= []
+ logger.info "Sending #{sz} alerts" if sz > 0
+
sz.times do
person, *args = Server.notification_pop
#
# Nil person.. that's craaazy too!
#
- break if person.nil?
- my_threads << Thread.new {
- person.do_send_alert(*args)
- }
- end
+ next if person.nil?
- my_threads.each do |t|
- begin
- t.join
- rescue StandardError => ex
- logger.error ex.to_s
- logger.debug ex.backtrace.join("\n")
- end
+ person.do_send_alert(*args)
end
end
def start
-
if Configuration.current.notification_methods['xmpp']
#
# Connect to XMPP server
@@ -66,6 +56,7 @@ module Mauve
Configuration.current.people[username].xmpp = jid unless jid.nil?
end
end
+
super
end