       instance      : ['updateInstance','notification']
     sharedMethods   :
       static        : ['create','fetch','fetchSome']
-      instance      : ['invite']
+      instance      : ['invite','leave']
     schema          :
       publicName    : String
       createdAt     :

        type        : [String]
        default     : -> []
      tags          : [ObjectRef]

  @fetch = secure (client, publicName, callback)->


          callback null, conversation
          conversation.invite client, invitee  for invitee in initialInvitees

  leave: secure (client, callback) ->
    # Check if user logged in
    {delegate} = client.connection
    JAccount   = require '../account'
    unless delegate instanceof JAccount
      return callback new KodingError 'Access denied.'

    {nickname} = delegate.profile

    @constructor.update {_id: @getId()}, {$pull: invitees: nickname}, (err)->
      callback err


  invite: secure (client, invitee, callback)->

    # Check if user logged in
