   unless data.admins?.length and data.actorId and data.name
     return callback {message: "Request is not valid"}
 
-  url = "/notification/group"
+  url = "#{socialProxyUrl}/notification/group"
   post url, data, callback
 
 searchTopics = (data, callback)->
   if not data.name
     return callback { message: "Name should be set for topic search"}
-  url = "/channel/search"
+  url = "#{socialProxyUrl}/channel/search"
   get url, data, callback
 
 fetchProfileFeed = (data, callback)->
   if not data.targetId
     return callback { message: "targetId should be set"}
-  url = "/account/#{data.targetId}/posts"
+  url = "#{socialProxyUrl}/account/#{data.targetId}/posts"
   get url, data, callback
 
 fetchProfileFeedCount = (data, callback)->
   if not data.targetId
     return callback { message: "targetId should be set"}
-  url = "/account/#{data.targetId}/posts/count"
+  url = "#{socialProxyUrl}/account/#{data.targetId}/posts/count"
   get url, data, callback
 
 messageById = (data, callback)->
   if not data.id
     return callback { message: "id should be set"}
-  url = "/message/#{data.id}"
+  url = "#{socialProxyUrl}/message/#{data.id}"
   get url, data, callback
 
 messageBySlug = (data, callback)->
   if not data.slug
     return callback { message: "slug should be set"}
-  url = "/message/slug/#{data.slug}"
+  url = "#{socialProxyUrl}/message/slug/#{data.slug}"
   get url, data, callback
 
 channelById = (data, callback)->
   if not data.id
     return callback { message: "id should be set"}
-  url = "/channel/#{data.id}"
+  url = "#{socialProxyUrl}/channel/#{data.id}"
   get url, data, callback
 
 channelByName = (data, callback)->
   if not data.name
     return callback { message: "name should be set"}
-  url = "/channel/name/#{data.name}"
+  url = "#{socialProxyUrl}/channel/name/#{data.name}"
   get url, data, callback
 
 checkChannelParticipation = (data, callback)->
   if not data.name or not data.type
     return callback { message: "request is not valid" }
 
-  url = "/channel/checkparticipation"
+  url = "#{socialProxyUrl}/channel/checkparticipation"
   get url, data, callback
 
 markAsTroll = (data, callback)->
   unless data.accountId
     return callback {message: "Request is not valid"}
 
-  url = "/trollmode/#{data.accountId}"
+  url = "#{socialProxyUrl}/trollmode/#{data.accountId}"
   post url, data, callback
 
 unmarkAsTroll = (data, callback)->
   unless data.accountId
     return callback {message: "Request is not valid"}
 
-  url = "/trollmode/#{data.accountId}"
+  url = "#{socialProxyUrl}/trollmode/#{data.accountId}"
   deleteReq url, data, callback
 
 getSiteMap = (data, callback)->

  unless data.id
    return callback { message: "Request is not valid for unliking a message"}

  url = "/message/#{data.id}/interaction/like/delete"
  delete data.id
  post url, data, callback


  if not data.accountId or not data.body or not data.messageId
    return callback { message: "Request is not valid for adding a reply"}

  url = "#{socialProxyUrl}/message/#{data.messageId}/reply"
  post url, data, callback

listReplies = (data, callback)->
  unless data.messageId
    return callback { message: "Request is not valid for adding a reply"}

  url = "#{socialProxyUrl}/message/#{data.messageId}/reply"
  get url, data, callback

fetchPopularTopics = (data, callback)->
  if not data.groupName or not data.type
    return callback {message: "Request is not valid for listing popular topics"}

  url = "#{socialProxyUrl}/popular/topics/#{data.type}"
  get url, data, callback

fetchPopularPosts = (data, callback)->
  if not data.groupName or not data.channelName
    return callback {message: "Request is not valid for listing popular topics"}

  url = "#{socialProxyUrl}/popular/posts/#{data.channelName}"
  get url, data, callback

fetchPinnedMessages = (data, callback)->
  url = "#{socialProxyUrl}/activity/pin/list"
  get url, data, callback

pinMessage = (data, callback)->
  if not data.accountId or not data.messageId or not data.groupName
    return callback { message: "Request is not valid"}

  url = "#{socialProxyUrl}/activity/pin/add"
  post url, data, callback

unpinMessage = (data, callback)->
  if not data.accountId or not data.messageId or not data.groupName
    return callback { message: "Request is not valid"}

  url = "#{socialProxyUrl}/activity/pin/remove"
  post url, data, callback

glancePinnedPost = (data, callback)->
  if not data.accountId or not data.messageId or not data.groupName
    return callback { message: "Request is not valid"}

  url = "#{socialProxyUrl}/activity/pin/glance"
  post url, data, callback

glanceNotifications = (data, callback)->
  if not data.accountId
    return callback { message: "Request is not valid"}

  url = "#{socialProxyUrl}/notification/glance"
  post url, data, callback

listNotifications = (data, callback)->
  if not data.accountId # or not data.groupName
    return callback {message: "Request is not valid"}

  url = "#{socialProxyUrl}/notification/#{data.accountId}"
  get url, data, callback

listParticipants = (data, callback)->
  return callback { message: "Request is not valid" } unless data.channelId
  url = "#{socialProxyUrl}/channel/#{data.channelId}/participants"
  get url, data, callback

addParticipants = (data, callback)->
  url = "#{socialProxyUrl}/channel/#{data.channelId}/participants/add"
  doChannelParticipantOperation data, url, callback

removeParticipants = (data, callback)->
  url = "#{socialProxyUrl}/channel/#{data.channelId}/participants/remove"

  {channelId, accountId} = data
  # fetch channel details
