Skip to content

Resolve "Remove self from a group via signal message"

Closes #22 (closed) and fulfils its Acceptance Criteria, which were:

GIVEN a group #red-alert on phone number +1-666-666-6666 with admin alice and member bob

  • WHEN bob sends a message saying "leave" to +1-666-666-6666
  • THEN bob will be removed from channel's subscribers
  • AND THEN bob will receive a message saying "you have been removed from #red-alert.
  • AND WHEN alice sends a message to #red-alert, bob will not get it

Note that for speed's sake I omitted to mention the channel name in responses to both JOIN and LEAVE commands. (We can add that later if users want it.)

Implementation Notes:

  • add channelRepository#removeSubscriber
  • add LEAVE command to command service (delegates to commandService#maybeRemove)
  • replace ADD command with JOIN command
  • introduce performOpIfChannelExists helper to DRY up channelRepository functions
Edited by aguestuser

Merge request reports

Loading