Skip to content

Resolve #99 "vouched mode -- with invite DMs"

aguestuser requested to merge 99-vouched-mode-with-invite-dms into master

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 or VOUCHING 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 or DECLINE 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
  • 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 english INVITE and the french INVITER
  • 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 or FR strings. that is deferred to subsequent (to-be-created) issues
Edited by aguestuser

Merge request reports

Loading