 
   dispatch CREATE_PRIVATE_CHANNEL, options
 
-  kd.singletons.socialapi.channel.createChannelWithParticipants options, (err, channels) ->
+  _options = _mapPrivateChannelOptions options
+
+  kd.singletons.socialapi.channel.createChannelWithParticipants _options, (err, channels) ->
     if err
       dispatch CREATE_PRIVATE_CHANNEL_FAIL, { err }
       showErrorNotification err, userMessage: err.message

kd                      = require 'kd'
actionTypes             = require './actiontypes'
showErrorNotification   = require 'app/util/showErrorNotification'


    [channel] = channels
    dispatch CREATE_PRIVATE_CHANNEL_SUCCESS, { channel }


_mapPrivateChannelOptions = (options) ->

  # don't modify arg
  _options = _.assign {}, options

  _options['payload'] or= {}
  _options['payload']['description'] = options.purpose
  _options['purpose'] = options.name
  _options['name'] = ''

  return _options


module.exports = {
