Skip to content
Snippets Groups Projects
Verified Commit 1b7d24ed authored by aguestuser's avatar aguestuser
Browse files

[91] refactor: use notifications type when dispatching REMOVE


context:
* long-term goal: all command responses return notifications,
  messenger is dumb: it just sees notificatoins in the CR, and
  gets 'em out the door!
* but we want to move incrementally and move to that signature one
  command at a time!
* this commit uses the refactor pattern that we want for *all*
  commands but only for the REMOVE comand

implementation:
* `execute.processCommand` (-> `removeAdmin`):
  * generates a notification for each person who is affected by the command
  * returns an array of notifications in the commandResult
* `messenger.handleNotifications` sees the notifications and sends
  them (doing a bit of datamunging that is necessary to keep the
  contract with `notify` but which we will eventually get rid of)
* TESTS!!! (both for `execute.removeAdmin` and for `messenger.handleNotification`)

co-authored-by: default avatarMari <m@marrri.com>
parent c892b7de
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment