TF-1718 Add unsubscribeMail method to datasource/repository/interactor on jmap server

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit f9159b651866fbe8e2a1866231b5413cecc5b597)
This commit is contained in:
dab246
2023-11-16 12:40:12 +07:00
committed by Dat Vu
parent 41eb95257d
commit 4d8c7dc52e
10 changed files with 124 additions and 2 deletions
@@ -224,4 +224,11 @@ class EmailDataSourceImpl extends EmailDataSource {
Future<SendingEmail> getStoredSendingEmail(AccountId accountId, UserName userName, String sendingId) {
throw UnimplementedError();
}
@override
Future<Email> unsubscribeMail(Session session, AccountId accountId, EmailId emailId) {
return Future.sync(() async {
return await emailAPI.unsubscribeMail(session, accountId, emailId);
}).catchError(_exceptionThrower.throwException);
}
}
@@ -287,4 +287,9 @@ class EmailHiveCacheDataSourceImpl extends EmailDataSource {
return sendingEmailCache.toSendingEmail();
}).catchError(_exceptionThrower.throwException);
}
@override
Future<Email> unsubscribeMail(Session session, AccountId accountId, EmailId emailId) {
throw UnimplementedError();
}
}