diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-09-16 13:20:37 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-09-16 13:20:37 +0100 |
commit | 95be8df00c41a50ab705b462c656beb2bc2996e9 (patch) | |
tree | a0535a582cc30e695f68d4543202181da67a57bd /lib/mauve/notifiers | |
parent | 76ce90887a16c466eb54e76f84794b8469a14692 (diff) |
Robustificate the XMPP ack interface.
Diffstat (limited to 'lib/mauve/notifiers')
-rw-r--r-- | lib/mauve/notifiers/xmpp.rb | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/lib/mauve/notifiers/xmpp.rb b/lib/mauve/notifiers/xmpp.rb index ae9734f..fa1751c 100644 --- a/lib/mauve/notifiers/xmpp.rb +++ b/lib/mauve/notifiers/xmpp.rb @@ -12,6 +12,10 @@ require 'mauve/notifiers/debug' # A couple of monkey patches to fix up all this nonsense. # module Jabber + # + # Monkey patch of the close commands. For good reasons, though I can't + # remember why. + # class Stream def close # @@ -47,22 +51,17 @@ end module Mauve - module Notifiers + module Notifiers + + # + # This is the Jabber/XMMP notifiers module. + # module Xmpp - -# class CountingMUCClient < Jabber::MUC::SimpleMUCClient -# -# attr_reader :participants -# -# def initialize(*a) -# super(*a) -# @participants = 0 -# self.on_join { @participants += 1 } -# self.on_leave { @participants -= 1 } -# end -# -# end -# + + # + # The default provider is XMMP, although this should really be broken out + # into its own provider to allow multple ways of doing XMPP. + # class Default include Jabber @@ -624,7 +623,7 @@ EOF end if alert.acknowledge!(Configuration.current.people[username], ack_until) - msg << "#{alert_id}: Acknowledged until #{alert.will_unacknowledge_at}" + msg << "#{alert_id}: Acknowledged until #{alert.will_unacknowledge_at.to_s_human}" succeeded << alert else msg << "#{alert_id}: Acknowledgement failed." |