class Restforce::Concerns::Streaming::ReplayExtension
def outgoing(message, callback)
def outgoing(message, callback) # Leave non-subscribe messages alone return callback.call(message) unless message['channel'] == '/meta/subscribe' channel = message['subscription'] # Set the replay value for the channel message['ext'] ||= {} message['ext']['replay'] = { channel => replay_id(channel) } # Carry on and send the message to the server callback.call message end