mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Check for empty sender on block sender rule
This commit is contained in:
@@ -609,9 +609,15 @@ public class EntityRule {
|
||||
}
|
||||
|
||||
static EntityRule blockSender(Context context, EntityMessage message, EntityFolder junk, boolean block_domain, List<String> whitelist) throws JSONException {
|
||||
if (message.from == null || message.from.length == 0)
|
||||
return null;
|
||||
|
||||
String sender = ((InternetAddress) message.from[0]).getAddress();
|
||||
String name = MessageHelper.formatAddresses(new Address[]{message.from[0]});
|
||||
|
||||
if (TextUtils.isEmpty(sender))
|
||||
return null;
|
||||
|
||||
if (block_domain) {
|
||||
int at = sender.indexOf('@');
|
||||
if (at > 0) {
|
||||
|
||||
Reference in New Issue
Block a user