diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-10-20 15:29:06 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-10-20 15:29:06 +0100 |
commit | 195ffe943614ac084839b590294ad740e4bb15d3 (patch) | |
tree | a6f9d89152cff31fe453d30f6240aa917833c88c /lib/mauve/notifier.rb | |
parent | 4f453dea9fffe8171c7585041b9a136c3a8b8fda (diff) |
More XMPP robustification.
Diffstat (limited to 'lib/mauve/notifier.rb')
-rw-r--r-- | lib/mauve/notifier.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/mauve/notifier.rb b/lib/mauve/notifier.rb index 14e188c..bf36162 100644 --- a/lib/mauve/notifier.rb +++ b/lib/mauve/notifier.rb @@ -42,13 +42,17 @@ module Mauve # # Make sure we're connected to the XMPP server if needed on every iteration. # - if Configuration.current.notification_methods['xmpp'] and !Configuration.current.notification_methods['xmpp'].ready? + xmpp = Configuration.current.notification_methods['xmpp'] + + if xmpp and !xmpp.ready? # # Connect to XMPP server # - xmpp = Configuration.current.notification_methods['xmpp'] - xmpp.connect + xmpp.connect + # + # Join all chats and shit. Unless the connection failed. + # Configuration.current.people.each do |username, person| # # Ignore people without XMPP stanzas. @@ -56,11 +60,6 @@ module Mauve next unless person.xmpp # - # Can't do this unless we're ready. - # - next unless xmpp.ready? - - # # For each JID, either ensure they're on our roster, or that we're in # that chat room. # @@ -71,7 +70,8 @@ module Mauve end Configuration.current.people[username].xmpp = jid unless jid.nil? - end + + end if xmpp.ready? end |