static send(invitee, room, message = null) {
    if (!cache.user) {
      return Promise.reject(new Error('Only an authenticated user can send an invite.'));
    }

    const inviteMetaData = {
      from: cache.user.uid,
      room: room.uid,
      status: ONGOING,
      _created: DataSync.ts(),
      topic: message
    };

    return DataSync.push(`_/invites/${invitee.uid}`, inviteMetaData)
      .then((inviteRef) => {
        const inviteId = inviteRef.name();
        return new Invite(Object.assign({ uid: inviteId, to: invitee.uid }, inviteMetaData));
      })
      .catch(Log.r('Invite#send'));
  }
/**
   * Create the invitation & add the user to the participants list
   * @access protected
   * @param {User} invitee The user to invite
   * @param {Room} room The room to invite the user to
   * @param {string} [message] A message for the invitee
   */
Create the invitation & add the user to the participants list
@access protected
@param {User} invitee The user to invite
@param {Room} room The room to invite the user to
@param {string} [message] A message for the invitee
Create the invitation & add the user to the participants list @access protected @param { User } invitee The user to invite @param { Room } room The room to invite the user to @param { string } [ message ] A message for the invitee
static send(invitee, room, message = null) {
    if (!cache.user) {
      return Promise.reject(new Error('Only an authenticated user can send an invite.'));
    }
    const inviteMetaData = {
      from: cache.user.uid,
      room: room.uid,
      status: ONGOING,
      _created: DataSync.ts(),
      topic: message
    };
    return DataSync.push(`_/invites/${invitee.uid}`, inviteMetaData)
      .then((inviteRef) => {
        const inviteId = inviteRef.name();
        return new Invite(Object.assign({ uid: inviteId, to: invitee.uid }, inviteMetaData));
      })
      .catch(Log.r('Invite#send'));
  }
static send ( invitee , room , message = null ) { if ( ! cache . user ) { return Promise . reject ( new Error ( 'Only an authenticated user can send an invite.' ) ) ; } const inviteMetaData = { from : cache . user . uid , room : room . uid , status : ONGOING , _created : DataSync . ts ( ) , topic : message } ; return DataSync . push ( ` ${ invitee . uid } ` , inviteMetaData ) . then ( ( inviteRef ) => { const inviteId = inviteRef . name ( ) ; return new Invite ( Object . assign ( { uid : inviteId , to : invitee . uid } , inviteMetaData ) ) ; } ) . catch ( Log . r ( 'Invite#send' ) ) ; }
Create the invitation & add the user to the participants list
 @access protected
 @param {User} invitee The user to invite
 @param {Room} room The room to invite the user to
 @param {string} [message] A message for the invitee
Create the invitation & add the user to the participants list @access protected @param { User } invitee The user to invite @param { Room } room The room to invite the user to @param { string } [ message ] A message for the invitee