aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/notifier.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2017-03-20 14:08:34 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2017-03-20 14:11:27 +0000
commitc1ca338fdb32b05fd047730be9ca6569d22c6806 (patch)
tree23eb2052dd9aaf7569d5c030a9b3676b69de947f /lib/mauve/notifier.rb
parentcce9b3743fa1128ffb72b7d2c5f5aa94a52993e9 (diff)
Updated gems to (roughly) jessie versions; removed XMPP support.
Also changed the postgres tests to "skip" if no postgres db is available.
Diffstat (limited to 'lib/mauve/notifier.rb')
-rw-r--r--lib/mauve/notifier.rb46
1 files changed, 1 insertions, 45 deletions
diff --git a/lib/mauve/notifier.rb b/lib/mauve/notifier.rb
index 35ac019..4939b03 100644
--- a/lib/mauve/notifier.rb
+++ b/lib/mauve/notifier.rb
@@ -1,6 +1,5 @@
require 'mauve/mauve_thread'
require 'mauve/notifiers'
-require 'mauve/notifiers/xmpp'
module Mauve
@@ -15,8 +14,7 @@ module Mauve
include Singleton
# Stop the notifier thread. This just makes sure that all the
- # notifications in the buffer have been sent before closing the XMPP
- # connection.
+ # notifications in the buffer have been sent.
#
def stop
super
@@ -25,11 +23,6 @@ module Mauve
# Flush the queue.
#
main_loop
-
- if Configuration.current.notification_methods['xmpp']
- Configuration.current.notification_methods['xmpp'].close
- end
-
end
#
@@ -69,43 +62,6 @@ module Mauve
#
#
def main_loop
-
- #
- # Make sure we're connected to the XMPP server if needed on every iteration.
- #
- xmpp = Configuration.current.notification_methods['xmpp']
-
- if xmpp and !xmpp.ready?
- #
- # Connect to XMPP server
- #
- xmpp.connect
-
- #
- # Join all chats and shit. Unless the connection failed.
- #
- Configuration.current.people.each do |username, person|
- #
- # Ignore people without XMPP stanzas.
- #
- next unless person.respond_to?(:xmpp) and person.xmpp
-
- #
- # For each JID, either ensure they're on our roster, or that we're in
- # that chat room.
- #
- jid = if xmpp.is_muc?(person.xmpp)
- xmpp.join_muc(person.xmpp)
- else
- xmpp.ensure_roster_and_subscription!(person.xmpp)
- end
-
- Configuration.current.people[username].xmpp = jid unless jid.nil?
-
- end if xmpp.ready?
-
- end
-
#
# Cycle through the buffer.
#