feat(GODT-2711): Send config_abort event on User removal.

This commit is contained in:
Romain LE JEUNE
2023-06-27 20:16:31 +02:00
committed by Romain Le Jeune
parent 124231c3c7
commit 68334e3bb8
3 changed files with 65 additions and 3 deletions

View File

@ -608,6 +608,11 @@ func (bridge *Bridge) logoutUser(ctx context.Context, user *user.User, withAPI,
logrus.WithError(err).Error("Failed to remove IMAP user")
}
// if this is actually a remove account
if withData && withAPI {
user.SendConfigStatusAbort()
}
if err := user.Logout(ctx, withAPI); err != nil {
logrus.WithError(err).Error("Failed to logout user")
}