Class: Primer::RealTime::ClientAuth

Inherits:
Object
  • Object
show all
Defined in:
lib/primer/real_time.rb

Instance Method Summary collapse

Instance Method Details

#outgoing(message, callback) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/primer/real_time.rb', line 25

def outgoing(message, callback)
  channel = message['channel']
  return callback.call(message) if Faye::Channel.meta?(channel)
  
  message['ext'] ||= {}
  message['ext']['password'] = RealTime.password
  
  callback.call(message)
end