REMOVE admin by id
context
- we don't want people to have to know each other's phone numbers
- admins have requested the ability to remove each other by admin id (see: #427 )
- so: let's make the payload for
REMOVE
and admin id (and drop support for removing by phone number)
behavior
discovering command
WHEN an admin issues HELP
- THEN the listing for
REMOVE
will give an example explaining howREMOVE @ADMIN_2
removes the admin
issuing removal
GIVEN a channel with admins maria (ADMIN 2) and jose (ADMIN 5)
- WHEN maria issues
REMOVE @ADMIN_5
- THEN jose is removed, and receives a notification that says
@ADMIN_2 removed you as an admin from this channel. Send HELLO to resubscribe.
- and THEN admins receive a notification that says
@ADMIN_2 removed @ADMIN_5.
admin id format consistency
WHEN an admin receives a notification referencing another admin (in header or body)
- THEN the notification will use an id of the form
@ADMIN_1
instead ofADMIN 1
sad paths
non-existent admin id
GIVEN a channel with admins maria (ADMIN 2) and jose (ADMIN 5)
- WHEN maria issues
REMOVE @ADMIN_6
where admin 6 doesn't exist - THEN she receives a response that says
Sorry, that admin ID does not exist.
trying to use phone number
GIVEN the above
- WHEN maria issues
REMOVE +12223334444
- THEN maria receives response that says
Sorry, that is not a valid admin id. Admin id's look like this: @ADMIN_1
using a garbage id
GIVEN the above
- WHEN maria issues
REMOVE +12223334444
- THEN she recieves a response that says
Sorry, that is not a valid admin id. Admin id's look like this: @ADMIN_1
open questions:
- are we sure we want to drop support for removing by phone number? (pretty sure we do! particularly if we want to move to UUIDs instead of phone numbers!) but... just raising it to make sure! /a/