TF-1759: Check when replying and all replies will include me in the recipient!

(cherry picked from commit f6481d05c18855a03d2b1cb2d4b94496d5b21d5b)
This commit is contained in:
HuyNguyen
2023-04-14 13:58:27 +07:00
committed by Dat Vu
parent 796cbcfc46
commit 00a8d92ec9
3 changed files with 21 additions and 6 deletions
@@ -26,4 +26,10 @@ extension ListEmailAddressExtension on Set<EmailAddress>? {
}
int numberEmailAddress() => this != null ? this!.length : 0;
List<EmailAddress> filterEmailAddress(EmailAddress emailAddressNotExist) {
return this != null
? this!.where((emailAddress) => emailAddress.email != emailAddressNotExist.email).toList()
: List.empty();
}
}
@@ -112,7 +112,7 @@ extension PresentationEmailExtension on PresentationEmail {
if (mailboxRole == PresentationMailbox.roleSent) {
return Tuple3(to.asList(), [], []);
} else {
final replyToAddress = replyTo.asList().isNotEmpty ? replyTo.asList() : from.asList();
final replyToAddress = replyTo.asList().isNotEmpty ? to.asList() + replyTo.asList() : from.asList();
return Tuple3(replyToAddress, [], []);
}
case EmailActionType.replyAll: