forked from Silverfish/proton-bridge
fix(BRIDGE-261): delete gluon data during user deletion; integration tests; FF kill switch; Sentry report if error;
This commit is contained in:
@ -233,6 +233,12 @@ func (s *Service) OnLogout(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *Service) OnDelete(ctx context.Context) error {
|
||||
_, err := s.cpc.Send(ctx, &onDeleteReq{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *Service) ShowAllMail(ctx context.Context, v bool) error {
|
||||
_, err := s.cpc.Send(ctx, &showAllMailReq{v: v})
|
||||
|
||||
@ -362,6 +368,11 @@ func (s *Service) run(ctx context.Context) { //nolint gocyclo
|
||||
err := s.removeConnectorsFromServer(ctx, s.connectors, false)
|
||||
req.Reply(ctx, nil, err)
|
||||
|
||||
case *onDeleteReq:
|
||||
s.log.Debug("Delete Request")
|
||||
err := s.removeConnectorsFromServer(ctx, s.connectors, true)
|
||||
req.Reply(ctx, nil, err)
|
||||
|
||||
case *showAllMailReq:
|
||||
s.log.Debug("Show all mail request")
|
||||
req.Reply(ctx, nil, nil)
|
||||
@ -644,6 +655,8 @@ type onLogoutReq struct{}
|
||||
|
||||
type showAllMailReq struct{ v bool }
|
||||
|
||||
type onDeleteReq struct{}
|
||||
|
||||
type setAddressModeReq struct {
|
||||
mode usertypes.AddressMode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user