Resolve #99 "vouched mode -- with invite DMs"
Closes #99 (closed)
This is a big honkin MR! See the issue's for the behavior section for a detailed description of the acceptance criteria it fulfills, or commit messages for detailed implementation notes.
At a high level, this MR:
- allows admins to toggle vouching on/off (by issuing
VOUCHING ON
orVOUCHING OFF
) - blocks users from subscribing without an invite when vouching is ON
- allows subscribers to invite new users with an
INVITE
command , which:- sends the invited user an invite message from the channel number
- creates a record of the invite to check against later
- does not leak information to the inviter about who is already invited or a subscriber in the responses to this command
- does all of the above whether vouching is toggled on or off (so users can more easily get their friends on a channel)
- allows invitees to
ACCEPT
orDECLINE
an invite such that:- after issuing
ACCEPT
an invited user is subscribed to the channel - after issuing
ACCEPT
, an uninvited user on a "vouching-on" channel IS NOT subscribed - after issuing
ACCEPT
, an uninvited user on a "vouching-off" channel IS subscribed
- after issuing
- invites are deleted:
- after an invite is accepted or declined
- if an hourly job detects an invite issued more than 2 weeks ago but still pending
As useful side-effects this MR:
- provides a more nuanced implementation of
commands.parse._matchOnCommand
(to disambiguate between the englishINVITE
and the frenchINVITER
- provides a much more rigorous unit test to enforce translation comprehensiveness in
test/unit/services/dispatcher/messages.spec.js
- reorganizes HELP response to bump HELP and INFO a bit, be more compact, and sort most useful commands to top
- streamlines and re-sorts the INFO response
This MR does NOT:
- provide spot-checked translations for
ES
orFR
strings. that is deferred to subsequent (to-be-created) issues
Edited by aguestuser