Module: Legion::TTY::NotificationGate
- Extended by:
- Logging::Helper
- Defined in:
- lib/legion/tty/notification_gate.rb
Class Method Summary collapse
- .should_deliver?(priority: :normal) ⇒ Boolean
- .update_presence(availability:, activity: nil) ⇒ Object
Class Method Details
.should_deliver?(priority: :normal) ⇒ Boolean
11 12 13 14 15 16 17 18 |
# File 'lib/legion/tty/notification_gate.rb', line 11 def should_deliver?(priority: :normal) return true unless gaia_gate_available? Legion::Gaia::NotificationGate.instance.should_notify?(priority: priority) rescue StandardError => e log.debug { "NotificationGate.should_deliver? failed: #{e.}" } true end |
.update_presence(availability:, activity: nil) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/legion/tty/notification_gate.rb', line 20 def update_presence(availability:, activity: nil) return unless gaia_gate_available? Legion::Gaia::NotificationGate.instance.update_presence( availability: availability, activity: activity ) rescue StandardError => e log.debug { "NotificationGate.update_presence failed: #{e.}" } nil end |