     else
       @consumer.send({command, identifier})
 
+  record: (data) ->
+    data.time = new Date()
+    @history = @history.slice(-19)
+    @history.push(data)
+
   toJSON: ->
-    subscription.identifier for subscription in @subscriptions
+    history: @history
+    identifiers: (subscription.identifier for subscription in @subscriptions)

    for subscription in subscriptions
      subscription[callbackName]?(args...)

  sendCommand: (subscription, command) ->
    {identifier} = subscription
    if identifier is Cable.PING_IDENTIFIER

class Cable.Subscriptions
  constructor: (@consumer) ->
    @subscriptions = []
    @history = []

  create: (channelName, mixin) ->
    channel = channelName
