Class: RocketChat::Realtime::Handlers::Changed

Inherits:
Base
  • Object
show all
Defined in:
lib/rocket_chat/realtime/handlers/changed.rb

Overview

Changed Message Handler

The DDP Subscribe changed event

Since:

  • 0.1.0

Instance Attribute Summary

Attributes inherited from Base

#dispatcher, #message

Instance Method Summary collapse

Methods inherited from Base

call, #initialize

Constructor Details

This class inherits a constructor from RocketChat::Realtime::Handlers::Base

Instance Method Details

#changedRocketChat::Realtime::Messages::Changed

Changed

Returns:

Since:

  • 0.1.0



20
21
22
# File 'lib/rocket_chat/realtime/handlers/changed.rb', line 20

def changed
  Messages::Changed.new(message['id'], message)
end

#processObject

See Also:

Since:

  • 0.1.0



25
26
27
# File 'lib/rocket_chat/realtime/handlers/changed.rb', line 25

def process
  client.emit(changed.collection, changed)
end