diff --git a/userapi/internal/api.go b/userapi/internal/api.go index f5a0f4b09..9a8af1faa 100644 --- a/userapi/internal/api.go +++ b/userapi/internal/api.go @@ -460,6 +460,14 @@ func (a *UserInternalAPI) PerformAccountDeactivation(ctx context.Context, req *a evacuateRes := &rsapi.PerformAdminEvacuateUserResponse{} a.RSAPI.PerformAdminEvacuateUser(ctx, evacuateReq, evacuateRes) if err := evacuateRes.Error; err != nil { + logrus.WithError(err).Errorf("Failed to evacuate user after account deactivation") + } + + deviceReq := &api.PerformDeviceDeletionRequest{ + UserID: fmt.Sprintf("@%s:%s", req.Localpart, a.ServerName), + } + deviceRes := &api.PerformDeviceDeletionResponse{} + if err := a.PerformDeviceDeletion(ctx, deviceReq, deviceRes); err != nil { return err }