sc: support `delete_account` command
context
- currently, when a channel is destroyed, we destroy the signald keystore for its signal account by deleting all json blobs on the file system pertaining to that account
- after migrating to signalc, these records will not be on the filesystem: they will be in our postgres-based
AccontProtocolStore, so if we want to actually remove all record of the channel, we need a way to delete those - this MR adds support for a
delete_accountcommand, which signalboost can issue as part of thephoneNumber.destroysequence to ask signalc to delete all protocol store records associated with the phone number being destroyed
behavior
WHEN a channel is destroyed
- THEN a psql shell run immediately after the destruction will not be able to discover any metadata about the channel's signal phone number
implementation notes
- upon receiving a
SocketRequest.DeleteAccountrequest (which should have a username/accountId as a field) signalc should use the username as an account id and delete all records that have it as its primary key. eg:- a row in the
accountstable - a row in the
sessions,prekeys,signed_prekeys, andidentitiestable - any associated indexes
- a row in the
- vacuum job should run immediately
Edited by aguestuser