Refactoring

This commit is contained in:
M66B
2024-01-07 11:04:17 +01:00
parent d42249bbd5
commit b3a384b346
2 changed files with 13 additions and 14 deletions

View File

@@ -349,6 +349,17 @@ public class EntityMessage implements Serializable {
return addresses.toArray(new Address[0]);
}
List<Address> getAllRecipients() {
List<Address> recipients = new ArrayList<>();
if (to != null)
recipients.addAll(Arrays.asList(to));
if (cc != null)
recipients.addAll(Arrays.asList(cc));
if (bcc != null)
recipients.addAll(Arrays.asList(bcc));
return recipients;
}
boolean hasKeyword(@NonNull String value) {
// https://tools.ietf.org/html/rfc5788
if (keywords == null)