-kd                = require 'kd'
-actionTypes       = require './actiontypes'
-fetchChatChannels = require 'activity/util/fetchChatChannels'
-isKoding          = require 'app/util/isKoding'
-getGroup          = require 'app/util/getGroup'
-MessageActions    = require './message'
+kd                      = require 'kd'
+actionTypes             = require './actiontypes'
+fetchChatChannels       = require 'activity/util/fetchChatChannels'
+isKoding                = require 'app/util/isKoding'
+getGroup                = require 'app/util/getGroup'
+MessageActions          = require './message'
+realtimeActionCreators  = require './realtime/actioncreators'
 { actions: appActions } = require 'app/flux'
 
 dispatch = (args...) -> kd.singletons.reactor.dispatch args...


    kd.singletons.reactor.batch ->
      channels.forEach (channel) ->
        dispatch LOAD_FOLLOWED_PUBLIC_CHANNEL_SUCCESS, { channel, options }




    kd.singletons.reactor.batch ->
      channels.forEach (channel) ->
        realtimeActionCreators.wrapChannel channel
        dispatch LOAD_FOLLOWED_PRIVATE_CHANNEL_SUCCESS, { channel, options }


