aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/notifier.rb
diff options
context:
space:
mode:
authorTelyn <telyn@telynz.uk>2018-01-31 11:30:50 +0000
committerGitHub <noreply@github.com>2018-01-31 11:30:50 +0000
commit9ef70ed3d53e11dacc5d4df4478d5ff452a2dd6d (patch)
treeace44f0ea0a81d7d369df74c3d95c219905e7fa6 /lib/mauve/notifier.rb
parent0be1fa0ebadf9435a760582d17f47ff96dc0851c (diff)
parent9af0d1761552601db30de7a991d90d64ec6c88f5 (diff)
Merge pull request #6 from BytemarkHosting/release-to-masterHEADmaster
Release to master
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.
#