leaveGroup = async options => {
  let defaults = {
      user: null,
      group: null,
      updateGroups: false,
      dispatch: () => null,
      done: () => null,
    },
    obj = { ...defaults, ...options },
    { user, group, updateGroups, dispatch, done } = obj,
    {
      data: { success, mssg },
    } = await post('/api/leave-group', { user, group })

  if (success) {
    updateGroups ? dispatch(leftGroup(group)) : null
    done()
  }

  Notify({ value: mssg })
}
Leave group

user, group & done properties must be provided
@param {Object} options Options for leaving group
@param {Number} options.user
@param {Number} options.group
@param {Boolean} options.updateGroups
@param {Function} options.dispatch
@param {Function} options.done