 
         callback {
           sessionToken, context, clientIP
-          connection: delegate: account
+          connection: { delegate: account }
         }
 
       else
 
-        callback { message: "Session error" }
+        callback { message: 'Session error' }

nodePath = require 'path'
Bongo    = require 'bongo'
Broker   = require 'broker'
{argv}   = require 'optimist'
{extend} = require 'underscore'

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

mongo = "mongodb://#{KONFIG.mongo}"


  mongo       : mongoReplSet or mongo
  root        : projectRoot
  models      : 'workers/social/lib/social/models'
  fetchClient : (sessionToken, context, callback) ->

    { JUser, JAccount } = koding.models
    [callback, context] = [context, callback]  unless callback

    callback ?= ->

    JUser.authenticateClient sessionToken, (err, res = {}) ->

      return console.error err  if err

