 
   JAccount = require '../account'
 
-  {fetchGroup} = require "./helper"
-
   Validators = require '../group/validators'
   {permit}   = require '../group/permissionset'
 
-  {fetchGroup, secureRequest, doRequest, permittedRequest} = require "./helper"
+  { fetchGroup, secureRequest,
+    doRequest, permittedRequest,
+    ensureGroupChannel } = require "./helper"
 
   @post = permit 'create posts',
     success: (client, data, callback)->
-      SocialMessage.ensureGroupChannel client, (err, socialApiChannelId)->
+      ensureGroupChannel client, (err, socialApiChannelId)->
         data.channelId = socialApiChannelId
         doRequest 'postToChannel', client, data, callback
 

    success: (client, data, callback)->
      if not data.messageId or not data.body
        return callback message: "Request is not valid for adding a reply"
      SocialMessage.ensureGroupChannel client, (err, socialApiChannelId)->
        data.initialChannelId = socialApiChannelId
        doRequest 'addReply', client, data, callback


        return callback message: "You should have at least one recipient"
      doRequest 'sendPrivateMessage', client, data, callback

  # todo-- ask Chris about using validators.own
  # how to implement for this case
  @canEdit = (client, data, callback)->
