   createId = require 'hat'
 
   KodingError = require '../../error'
+
+  {uniq} = require 'underscore'
 
   @share()
 

    {delegate} = client.connection
    {nickname} = delegate.profile

    delegateCanInvite = nickname? and
                        nickname in [@createdBy].concat @participants

    return callback new KodingError "Access denied!" unless delegateCanInvite


      avatar        : String
      group         : ObjectId
      invitees      :
        type        : [String]
        default     : -> []
      tags          : [ObjectRef]
