TF-2599 Fix notification flood

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2024-02-22 15:49:01 +07:00
committed by Dat H. Pham
parent 07042bfb45
commit a90e36c6b3
8 changed files with 124 additions and 87 deletions
@@ -38,7 +38,7 @@ class GetEmailChangesToRemoveNotificationInteractor {
currentState,
propertiesCreated: propertiesCreated,
propertiesUpdated: propertiesUpdated);
yield Right<Failure, Success>(GetEmailChangesToRemoveNotificationSuccess(emailIds));
yield Right<Failure, Success>(GetEmailChangesToRemoveNotificationSuccess(session.username, emailIds));
} else {
yield Left<Failure, Success>(GetEmailChangesToRemoveNotificationFailure(NotFoundEmailStateException()));
}
@@ -15,9 +15,9 @@ class GetMailboxesNotPutNotificationsInteractor {
try {
yield Right<Failure, Success>(GetMailboxesNotPutNotificationsLoading());
final mailboxes = await _fcmRepository.getMailboxesNotPutNotifications(session, accountId);
yield Right<Failure, Success>(GetMailboxesNotPutNotificationsSuccess(mailboxes));
yield Right<Failure, Success>(GetMailboxesNotPutNotificationsSuccess(mailboxes, session.username));
} catch (e) {
yield Left<Failure, Success>(GetMailboxesNotPutNotificationsFailure(e));
yield Left<Failure, Success>(GetMailboxesNotPutNotificationsFailure(e, session.username));
}
}
}