Class: Maia::Messengers::Inline

Inherits:
Object
  • Object
show all
Defined in:
lib/maia/messengers/inline.rb

Instance Method Summary collapse

Instance Method Details

#deliver(payload, gateway: Maia.gateway) ⇒ Object


4
5
6
7
8
9
10
# File 'lib/maia/messengers/inline.rb', line 4

def deliver(payload, gateway: Maia.gateway)
  gateway.deliver payload
rescue Maia::Error::Unregistered => e
  device = Maia::Device.find_by(token: e.token)
  device.destroy
  raise
end