Class: Slanger::PresenceSubscription
- Inherits:
-
Subscription
- Object
- Subscription
- Slanger::PresenceSubscription
- Defined in:
- lib/slanger/presence_subscription.rb
Instance Attribute Summary
Attributes inherited from Subscription
Instance Method Summary collapse
Methods inherited from Subscription
Constructor Details
This class inherits a constructor from Slanger::Subscription
Instance Method Details
#subscribe ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/slanger/presence_subscription.rb', line 3 def subscribe return handle_invalid_signature if invalid_signature? unless channel_data? return connection.error({ message: "presence-channel is a presence channel and subscription must include channel_data", }) end channel.subscribe(@msg, callback) { |m| m } end |