TF-2302 Fix delete folder

Signed-off-by: dab246 <tdvu@linagora.com>

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit e5d455fd923053d1cd3793204130e6dd4423f5e0)
This commit is contained in:
dab246
2023-11-07 16:21:42 +07:00
committed by Dat Vu
parent f7ba168d7a
commit 0c46071bbf
3 changed files with 15 additions and 18 deletions
@@ -204,12 +204,11 @@ class EmailAPI with HandleSetErrorMixin {
}
final emailCreated = setEmailResponse?.created?[idCreateMethod];
final listEntriesErrors = handleSetResponse([
final mapErrors = handleSetResponse([
setEmailResponse,
setEmailSubmissionResponse,
markAsAnsweredOrForwardedSetResponse
]);
final mapErrors = Map.fromEntries(listEntriesErrors);
if (emailCreated != null && mapErrors.isEmpty) {
return true;
@@ -482,8 +481,7 @@ class EmailAPI with HandleSetErrorMixin {
);
final emailCreated = setEmailResponse?.created?[idCreateMethod];
final listEntriesErrors = handleSetResponse([setEmailResponse]);
final mapErrors = Map.fromEntries(listEntriesErrors);
final mapErrors = handleSetResponse([setEmailResponse]);
if (emailCreated != null && mapErrors.isEmpty) {
return emailCreated;
@@ -549,8 +547,7 @@ class EmailAPI with HandleSetErrorMixin {
final emailUpdated = setEmailResponse?.created?[idCreateMethod];
final isEmailDeleted = setEmailResponse?.destroyed?.contains(oldEmailId.id);
final listEntriesErrors = handleSetResponse([setEmailResponse]);
final mapErrors = Map.fromEntries(listEntriesErrors);
final mapErrors = handleSetResponse([setEmailResponse]);
if (emailUpdated != null && isEmailDeleted == true && mapErrors.isEmpty) {
return emailUpdated;