   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


KONFIG = require('koding-config-manager').load("main.#{argv.c}")

request        = require 'request'
_               = require "underscore"

socialProxyUrl  = "/api/social"
webhookProxyUrl = "/api/integration"
localDomain     = KONFIG.socialapi.customDomain.local

wrapCallback = (callback)->
  (err, response, body) ->
