2018-08-02 13:33:06 +00:00
|
|
|
package eu.faircode.email;
|
|
|
|
|
|
|
|
|
|
/*
|
2018-08-14 05:53:24 +00:00
|
|
|
This file is part of FairEmail.
|
2018-08-02 13:33:06 +00:00
|
|
|
|
2018-08-14 05:53:24 +00:00
|
|
|
FairEmail is free software: you can redistribute it and/or modify
|
2018-08-02 13:33:06 +00:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
2018-10-29 10:46:49 +00:00
|
|
|
FairEmail is distributed in the hope that it will be useful,
|
2018-08-02 13:33:06 +00:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2018-10-29 10:46:49 +00:00
|
|
|
along with FairEmail. If not, see <http://www.gnu.org/licenses/>.
|
2018-08-02 13:33:06 +00:00
|
|
|
|
2020-01-05 18:32:53 +01:00
|
|
|
Copyright 2018-2020 by Marcel Bokhorst (M66B)
|
2018-08-02 13:33:06 +00:00
|
|
|
*/
|
|
|
|
|
|
2019-01-07 15:05:24 +00:00
|
|
|
import android.app.AlarmManager;
|
|
|
|
|
import android.app.PendingIntent;
|
2018-08-19 06:53:56 +00:00
|
|
|
import android.content.Context;
|
2019-01-07 15:05:24 +00:00
|
|
|
import android.content.Intent;
|
2019-09-29 18:00:58 +02:00
|
|
|
import android.os.Build;
|
2018-08-19 06:53:56 +00:00
|
|
|
|
2019-04-17 20:21:44 +02:00
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.room.Entity;
|
|
|
|
|
import androidx.room.ForeignKey;
|
|
|
|
|
import androidx.room.Index;
|
|
|
|
|
import androidx.room.PrimaryKey;
|
|
|
|
|
|
2018-08-19 06:53:56 +00:00
|
|
|
import java.io.File;
|
2018-08-26 13:24:16 +00:00
|
|
|
import java.io.Serializable;
|
2019-05-29 12:13:49 +02:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
2018-08-14 05:32:17 +00:00
|
|
|
import java.util.Date;
|
2019-05-29 12:13:49 +02:00
|
|
|
import java.util.List;
|
2019-11-12 10:57:26 +01:00
|
|
|
import java.util.Locale;
|
2019-02-26 11:05:21 +01:00
|
|
|
import java.util.Objects;
|
2019-09-01 16:02:48 +02:00
|
|
|
import java.util.UUID;
|
2018-08-13 11:22:57 +00:00
|
|
|
|
2018-08-07 16:25:57 +00:00
|
|
|
import javax.mail.Address;
|
2019-11-12 10:57:26 +01:00
|
|
|
import javax.mail.internet.InternetAddress;
|
2018-08-07 16:25:57 +00:00
|
|
|
|
2018-08-08 06:55:47 +00:00
|
|
|
import static androidx.room.ForeignKey.CASCADE;
|
2018-11-12 14:45:02 +01:00
|
|
|
import static androidx.room.ForeignKey.SET_NULL;
|
2018-08-02 13:33:06 +00:00
|
|
|
|
|
|
|
|
// https://developer.android.com/training/data-storage/room/defining-data
|
|
|
|
|
|
|
|
|
|
@Entity(
|
|
|
|
|
tableName = EntityMessage.TABLE_NAME,
|
|
|
|
|
foreignKeys = {
|
2018-08-08 06:55:47 +00:00
|
|
|
@ForeignKey(childColumns = "account", entity = EntityAccount.class, parentColumns = "id", onDelete = CASCADE),
|
|
|
|
|
@ForeignKey(childColumns = "folder", entity = EntityFolder.class, parentColumns = "id", onDelete = CASCADE),
|
2018-11-12 14:45:02 +01:00
|
|
|
@ForeignKey(childColumns = "identity", entity = EntityIdentity.class, parentColumns = "id", onDelete = SET_NULL),
|
2018-11-16 13:48:45 +01:00
|
|
|
@ForeignKey(childColumns = "replying", entity = EntityMessage.class, parentColumns = "id", onDelete = SET_NULL),
|
|
|
|
|
@ForeignKey(childColumns = "forwarding", entity = EntityMessage.class, parentColumns = "id", onDelete = SET_NULL)
|
2018-08-02 13:33:06 +00:00
|
|
|
},
|
|
|
|
|
indices = {
|
|
|
|
|
@Index(value = {"account"}),
|
|
|
|
|
@Index(value = {"folder"}),
|
|
|
|
|
@Index(value = {"identity"}),
|
2018-12-06 11:59:57 +01:00
|
|
|
@Index(value = {"folder", "uid"}, unique = true),
|
2020-05-01 11:14:09 +02:00
|
|
|
@Index(value = {"inreplyto"}),
|
2019-03-31 16:36:41 +02:00
|
|
|
@Index(value = {"msgid"}),
|
2018-08-02 13:33:06 +00:00
|
|
|
@Index(value = {"thread"}),
|
2018-12-27 11:32:20 +00:00
|
|
|
@Index(value = {"sender"}),
|
2018-08-05 11:44:46 +00:00
|
|
|
@Index(value = {"received"}),
|
2019-03-05 13:38:05 +00:00
|
|
|
@Index(value = {"subject"}),
|
2018-08-05 11:44:46 +00:00
|
|
|
@Index(value = {"ui_seen"}),
|
2018-12-03 09:33:43 +01:00
|
|
|
@Index(value = {"ui_flagged"}),
|
2018-09-04 14:07:50 +00:00
|
|
|
@Index(value = {"ui_hide"}),
|
2018-10-16 11:29:12 +00:00
|
|
|
@Index(value = {"ui_found"}),
|
2018-11-26 16:57:00 +01:00
|
|
|
@Index(value = {"ui_ignored"}),
|
2019-01-07 15:05:24 +00:00
|
|
|
@Index(value = {"ui_browsed"}),
|
|
|
|
|
@Index(value = {"ui_snoozed"})
|
2018-08-02 13:33:06 +00:00
|
|
|
}
|
|
|
|
|
)
|
2018-08-26 13:24:16 +00:00
|
|
|
public class EntityMessage implements Serializable {
|
2018-08-02 13:33:06 +00:00
|
|
|
static final String TABLE_NAME = "message";
|
|
|
|
|
|
2019-11-30 09:22:16 +01:00
|
|
|
static final Integer ENCRYPT_NONE = 0;
|
|
|
|
|
static final Integer PGP_SIGNENCRYPT = 1;
|
|
|
|
|
static final Integer PGP_SIGNONLY = 2;
|
2019-12-02 08:35:09 +01:00
|
|
|
static final Integer SMIME_SIGNENCRYPT = 3;
|
|
|
|
|
static final Integer SMIME_SIGNONLY = 4;
|
2019-11-27 10:40:43 +01:00
|
|
|
|
2019-09-30 16:55:58 +02:00
|
|
|
static final Integer PRIORITIY_LOW = 0;
|
|
|
|
|
static final Integer PRIORITIY_NORMAL = 1;
|
|
|
|
|
static final Integer PRIORITIY_HIGH = 2;
|
|
|
|
|
|
2018-08-02 13:33:06 +00:00
|
|
|
@PrimaryKey(autoGenerate = true)
|
|
|
|
|
public Long id;
|
2018-11-12 14:45:02 +01:00
|
|
|
@NonNull
|
2018-09-13 07:06:06 +00:00
|
|
|
public Long account; // performance
|
2018-08-02 13:33:06 +00:00
|
|
|
@NonNull
|
|
|
|
|
public Long folder;
|
|
|
|
|
public Long identity;
|
2018-11-09 07:22:44 +00:00
|
|
|
public String extra; // plus
|
2019-01-21 16:45:05 +00:00
|
|
|
public Long replying; // obsolete
|
|
|
|
|
public Long forwarding; // obsolete
|
2019-01-07 17:50:23 +00:00
|
|
|
public Long uid; // compose/moved = null
|
2020-05-09 07:56:06 +02:00
|
|
|
public String uidl; // POP3
|
2018-08-02 13:33:06 +00:00
|
|
|
public String msgid;
|
2020-04-01 10:42:37 +02:00
|
|
|
public String hash; // headers hash
|
2018-08-02 13:33:06 +00:00
|
|
|
public String references;
|
2018-09-18 08:55:59 +00:00
|
|
|
public String deliveredto;
|
2018-08-02 13:33:06 +00:00
|
|
|
public String inreplyto;
|
2020-05-06 14:50:30 +02:00
|
|
|
public String wasforwardedfrom;
|
2018-08-02 13:33:06 +00:00
|
|
|
public String thread; // compose = null
|
2019-09-30 16:55:58 +02:00
|
|
|
public Integer priority;
|
2020-02-01 13:51:32 +01:00
|
|
|
public Integer importance;
|
2019-10-01 13:56:48 +02:00
|
|
|
public Boolean receipt; // is receipt
|
2019-04-17 20:21:44 +02:00
|
|
|
public Boolean receipt_request;
|
2019-04-18 19:13:38 +02:00
|
|
|
public Address[] receipt_to;
|
2019-04-12 16:15:42 +02:00
|
|
|
public Boolean dkim;
|
|
|
|
|
public Boolean spf;
|
|
|
|
|
public Boolean dmarc;
|
2019-07-16 14:44:21 +02:00
|
|
|
public Boolean mx = null;
|
2019-02-04 11:45:38 +00:00
|
|
|
public String avatar; // lookup URI from sender
|
2020-02-04 14:22:19 +01:00
|
|
|
public String sender; // sort key: from email address
|
2020-01-30 18:24:46 +01:00
|
|
|
public Address[] submitter;
|
2018-08-07 16:25:57 +00:00
|
|
|
public Address[] from;
|
|
|
|
|
public Address[] to;
|
|
|
|
|
public Address[] cc;
|
|
|
|
|
public Address[] bcc;
|
|
|
|
|
public Address[] reply;
|
2019-04-23 11:47:56 +02:00
|
|
|
public Address[] list_post;
|
2019-09-08 12:57:21 +02:00
|
|
|
public String unsubscribe;
|
2019-12-24 17:18:48 +01:00
|
|
|
public String autocrypt;
|
2018-09-05 07:23:51 +00:00
|
|
|
public String headers;
|
2019-01-16 17:37:45 +00:00
|
|
|
public Boolean raw;
|
2018-08-02 13:33:06 +00:00
|
|
|
public String subject;
|
2019-04-05 11:08:18 +02:00
|
|
|
public Long size;
|
2019-09-30 21:00:28 +02:00
|
|
|
public Long total;
|
2018-09-15 07:22:42 +00:00
|
|
|
@NonNull
|
2019-07-24 14:49:55 +02:00
|
|
|
public Integer attachments = 0; // performance
|
|
|
|
|
@NonNull
|
2018-09-16 10:44:13 +00:00
|
|
|
public Boolean content = false;
|
2020-03-26 13:29:43 +01:00
|
|
|
public String language = null; // classified
|
2019-05-04 20:52:21 +02:00
|
|
|
public Boolean plain_only = null;
|
2019-11-27 10:40:43 +01:00
|
|
|
public Integer encrypt = null;
|
2020-01-18 11:28:37 +01:00
|
|
|
public Integer ui_encrypt = null;
|
2018-11-04 15:34:30 +00:00
|
|
|
public String preview;
|
2019-09-07 10:30:46 +02:00
|
|
|
@NonNull
|
|
|
|
|
public Boolean signature = true;
|
2018-08-02 13:33:06 +00:00
|
|
|
public Long sent; // compose = null
|
|
|
|
|
@NonNull
|
|
|
|
|
public Long received; // compose = stored
|
|
|
|
|
@NonNull
|
2018-08-14 05:32:17 +00:00
|
|
|
public Long stored = new Date().getTime();
|
|
|
|
|
@NonNull
|
2018-11-26 16:41:33 +01:00
|
|
|
public Boolean seen = false;
|
2018-08-02 13:33:06 +00:00
|
|
|
@NonNull
|
2018-11-26 16:41:33 +01:00
|
|
|
public Boolean answered = false;
|
2018-11-24 19:14:28 +01:00
|
|
|
@NonNull
|
2018-11-26 16:41:33 +01:00
|
|
|
public Boolean flagged = false;
|
2019-01-29 20:15:24 +00:00
|
|
|
public String flags; // system flags
|
2018-11-25 17:52:30 +01:00
|
|
|
public String[] keywords; // user flags
|
2018-09-07 15:12:43 +00:00
|
|
|
@NonNull
|
2019-07-06 10:16:42 +02:00
|
|
|
public Integer notifying = 0;
|
|
|
|
|
@NonNull
|
2020-01-14 22:39:35 +01:00
|
|
|
public Boolean fts = false;
|
|
|
|
|
@NonNull
|
2018-11-26 16:41:33 +01:00
|
|
|
public Boolean ui_seen = false;
|
2018-08-02 13:33:06 +00:00
|
|
|
@NonNull
|
2018-11-26 16:41:33 +01:00
|
|
|
public Boolean ui_answered = false;
|
2018-11-24 19:14:28 +01:00
|
|
|
@NonNull
|
2018-11-26 16:41:33 +01:00
|
|
|
public Boolean ui_flagged = false;
|
2018-09-07 15:12:43 +00:00
|
|
|
@NonNull
|
2019-09-27 18:25:55 +02:00
|
|
|
public Boolean ui_hide = false;
|
2018-09-01 16:34:16 +00:00
|
|
|
@NonNull
|
2018-11-26 16:41:33 +01:00
|
|
|
public Boolean ui_found = false;
|
2018-10-16 11:29:12 +00:00
|
|
|
@NonNull
|
2018-11-26 16:41:33 +01:00
|
|
|
public Boolean ui_ignored = false;
|
2018-11-26 16:57:00 +01:00
|
|
|
@NonNull
|
|
|
|
|
public Boolean ui_browsed = false;
|
2019-10-14 11:29:46 +02:00
|
|
|
public Long ui_busy;
|
2019-01-07 15:05:24 +00:00
|
|
|
public Long ui_snoozed;
|
2020-05-19 12:46:35 +02:00
|
|
|
@NonNull
|
|
|
|
|
public Boolean ui_unsnoozed = false;
|
2019-05-15 11:10:47 +02:00
|
|
|
public Integer color;
|
2019-04-18 09:12:30 +02:00
|
|
|
public Integer revision; // compose
|
2019-04-18 11:29:15 +02:00
|
|
|
public Integer revisions; // compose
|
2019-01-17 10:49:18 +00:00
|
|
|
public String warning; // persistent
|
|
|
|
|
public String error; // volatile
|
2018-11-19 14:14:02 +01:00
|
|
|
public Long last_attempt; // send
|
2018-08-02 13:33:06 +00:00
|
|
|
|
2018-08-13 11:22:57 +00:00
|
|
|
static String generateMessageId() {
|
2020-05-19 07:36:41 +02:00
|
|
|
return generateMessageId("localhost");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static String generateMessageId(String domain) {
|
|
|
|
|
return "<" + UUID.randomUUID() + "@" + domain + '>';
|
2018-08-11 14:13:29 +00:00
|
|
|
}
|
|
|
|
|
|
2019-10-02 13:10:39 +02:00
|
|
|
boolean replySelf(List<TupleIdentityEx> identities, long account) {
|
2019-09-27 09:17:53 +02:00
|
|
|
Address[] senders = (reply == null || reply.length == 0 ? from : reply);
|
|
|
|
|
if (identities != null && senders != null)
|
|
|
|
|
for (Address sender : senders)
|
2019-09-26 12:51:39 +02:00
|
|
|
for (TupleIdentityEx identity : identities)
|
2019-10-02 13:10:39 +02:00
|
|
|
if (identity.account == account && identity.similarAddress(sender))
|
2019-09-26 12:51:39 +02:00
|
|
|
return true;
|
2019-09-22 20:03:31 +02:00
|
|
|
|
|
|
|
|
return false;
|
2019-05-29 16:03:00 +02:00
|
|
|
}
|
|
|
|
|
|
2019-10-02 13:10:39 +02:00
|
|
|
Address[] getAllRecipients(List<TupleIdentityEx> identities, long account) {
|
2019-05-29 12:13:49 +02:00
|
|
|
List<Address> addresses = new ArrayList<>();
|
2019-05-29 14:09:54 +02:00
|
|
|
|
2019-10-02 13:10:39 +02:00
|
|
|
if (to != null && !replySelf(identities, account))
|
2019-05-29 15:04:18 +02:00
|
|
|
addresses.addAll(Arrays.asList(to));
|
2019-05-29 12:13:49 +02:00
|
|
|
|
|
|
|
|
if (cc != null)
|
|
|
|
|
addresses.addAll(Arrays.asList(cc));
|
|
|
|
|
|
2019-05-29 14:09:54 +02:00
|
|
|
// Filter self
|
2019-09-23 13:04:34 +02:00
|
|
|
if (identities != null)
|
2019-09-22 21:04:21 +02:00
|
|
|
for (Address address : new ArrayList<>(addresses))
|
2019-09-23 13:04:34 +02:00
|
|
|
for (TupleIdentityEx identity : identities)
|
2019-10-02 13:10:39 +02:00
|
|
|
if (identity.account == account && identity.similarAddress(address))
|
2019-09-23 13:04:34 +02:00
|
|
|
addresses.remove(address);
|
2019-05-29 14:09:54 +02:00
|
|
|
|
2019-05-29 12:13:49 +02:00
|
|
|
return addresses.toArray(new Address[0]);
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-06 14:27:28 +02:00
|
|
|
boolean isForwarded() {
|
|
|
|
|
if (keywords != null)
|
|
|
|
|
for (String keyword : keywords)
|
|
|
|
|
if ("$Forwarded".equalsIgnoreCase(keyword))
|
|
|
|
|
return true;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-12 10:57:26 +01:00
|
|
|
String getNotificationChannelId() {
|
|
|
|
|
if (from == null || from.length == 0)
|
|
|
|
|
return null;
|
|
|
|
|
InternetAddress sender = (InternetAddress) from[0];
|
|
|
|
|
return "notification." + sender.getAddress().toLowerCase(Locale.ROOT);
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-02 10:48:11 +02:00
|
|
|
static File getFile(Context context, Long id) {
|
2018-08-19 06:53:56 +00:00
|
|
|
File dir = new File(context.getFilesDir(), "messages");
|
2018-12-05 17:30:23 +01:00
|
|
|
if (!dir.exists())
|
|
|
|
|
dir.mkdir();
|
2018-08-21 14:25:42 +00:00
|
|
|
return new File(dir, id.toString());
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-02 10:48:11 +02:00
|
|
|
File getFile(Context context) {
|
|
|
|
|
return getFile(context, id);
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-18 09:12:30 +02:00
|
|
|
File getFile(Context context, int revision) {
|
|
|
|
|
File dir = new File(context.getFilesDir(), "revision");
|
|
|
|
|
if (!dir.exists())
|
|
|
|
|
dir.mkdir();
|
|
|
|
|
return new File(dir, id + "." + revision);
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-19 21:53:12 +01:00
|
|
|
File getRefFile(Context context) {
|
2019-01-21 16:45:05 +00:00
|
|
|
File dir = new File(context.getFilesDir(), "references");
|
|
|
|
|
if (!dir.exists())
|
|
|
|
|
dir.mkdir();
|
|
|
|
|
return new File(dir, id.toString());
|
2018-08-19 06:53:56 +00:00
|
|
|
}
|
|
|
|
|
|
2019-03-14 07:45:13 +00:00
|
|
|
File getRawFile(Context context) {
|
2019-01-16 17:37:45 +00:00
|
|
|
File dir = new File(context.getFilesDir(), "raw");
|
|
|
|
|
if (!dir.exists())
|
|
|
|
|
dir.mkdir();
|
2019-12-13 09:09:45 +01:00
|
|
|
return new File(dir, id + ".eml");
|
2019-01-16 17:37:45 +00:00
|
|
|
}
|
|
|
|
|
|
2019-01-07 15:05:24 +00:00
|
|
|
static void snooze(Context context, long id, Long wakeup) {
|
2019-03-02 09:05:29 +00:00
|
|
|
Intent snoozed = new Intent(context, ServiceUI.class);
|
2019-09-24 09:34:43 +02:00
|
|
|
snoozed.setAction("wakeup:" + id);
|
|
|
|
|
PendingIntent pi = PendingIntent.getService(context, ServiceUI.PI_WAKEUP, snoozed, PendingIntent.FLAG_UPDATE_CURRENT);
|
2019-01-07 15:05:24 +00:00
|
|
|
|
|
|
|
|
AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
2019-10-12 11:09:54 +02:00
|
|
|
if (wakeup == null || wakeup == Long.MAX_VALUE) {
|
2019-01-07 15:05:24 +00:00
|
|
|
Log.i("Cancel snooze id=" + id);
|
|
|
|
|
am.cancel(pi);
|
|
|
|
|
} else {
|
|
|
|
|
Log.i("Set snooze id=" + id + " wakeup=" + new Date(wakeup));
|
2019-09-29 18:00:58 +02:00
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
|
|
|
|
|
am.set(AlarmManager.RTC_WAKEUP, wakeup, pi);
|
|
|
|
|
else
|
|
|
|
|
am.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, wakeup, pi);
|
2019-01-07 15:05:24 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-08 17:44:21 +02:00
|
|
|
static String getKeywordAlias(Context context, String keyword) {
|
|
|
|
|
switch (keyword) {
|
|
|
|
|
case "$label1": // Important
|
|
|
|
|
return context.getString(R.string.title_keyword_label1);
|
|
|
|
|
case "$label2": // Work
|
|
|
|
|
return context.getString(R.string.title_keyword_label2);
|
|
|
|
|
case "$label3": // Personal
|
|
|
|
|
return context.getString(R.string.title_keyword_label3);
|
|
|
|
|
case "$label4": // To do
|
|
|
|
|
return context.getString(R.string.title_keyword_label4);
|
|
|
|
|
case "$label5": // Later
|
|
|
|
|
return context.getString(R.string.title_keyword_label5);
|
|
|
|
|
default:
|
|
|
|
|
return keyword;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-02 13:33:06 +00:00
|
|
|
@Override
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
|
if (obj instanceof EntityMessage) {
|
|
|
|
|
EntityMessage other = (EntityMessage) obj;
|
2019-02-26 11:05:21 +01:00
|
|
|
return (Objects.equals(this.account, other.account) &&
|
2018-08-02 13:33:06 +00:00
|
|
|
this.folder.equals(other.folder) &&
|
2019-02-26 11:05:21 +01:00
|
|
|
Objects.equals(this.identity, other.identity) &&
|
2020-01-18 11:28:37 +01:00
|
|
|
// extra
|
2019-02-26 11:05:21 +01:00
|
|
|
Objects.equals(this.uid, other.uid) &&
|
|
|
|
|
Objects.equals(this.msgid, other.msgid) &&
|
|
|
|
|
Objects.equals(this.references, other.references) &&
|
|
|
|
|
Objects.equals(this.deliveredto, other.deliveredto) &&
|
|
|
|
|
Objects.equals(this.inreplyto, other.inreplyto) &&
|
2020-05-07 18:27:50 +02:00
|
|
|
Objects.equals(this.wasforwardedfrom, other.wasforwardedfrom) &&
|
2019-02-26 11:05:21 +01:00
|
|
|
Objects.equals(this.thread, other.thread) &&
|
2019-10-01 13:56:48 +02:00
|
|
|
Objects.equals(this.priority, other.priority) &&
|
|
|
|
|
Objects.equals(this.receipt, other.receipt) &&
|
2019-04-25 17:35:27 +02:00
|
|
|
Objects.equals(this.receipt_request, other.receipt_request) &&
|
|
|
|
|
MessageHelper.equal(this.receipt_to, other.receipt_to) &&
|
|
|
|
|
Objects.equals(this.dkim, other.dkim) &&
|
|
|
|
|
Objects.equals(this.spf, other.spf) &&
|
|
|
|
|
Objects.equals(this.dmarc, other.dmarc) &&
|
2019-07-16 14:44:21 +02:00
|
|
|
Objects.equals(this.mx, other.mx) &&
|
2019-06-25 09:46:31 +02:00
|
|
|
Objects.equals(this.avatar, other.avatar) &&
|
|
|
|
|
Objects.equals(this.sender, other.sender) &&
|
2018-12-25 08:22:07 +00:00
|
|
|
MessageHelper.equal(this.from, other.from) &&
|
|
|
|
|
MessageHelper.equal(this.to, other.to) &&
|
|
|
|
|
MessageHelper.equal(this.cc, other.cc) &&
|
|
|
|
|
MessageHelper.equal(this.bcc, other.bcc) &&
|
|
|
|
|
MessageHelper.equal(this.reply, other.reply) &&
|
2019-04-25 17:35:27 +02:00
|
|
|
MessageHelper.equal(this.list_post, other.list_post) &&
|
2020-01-18 11:28:37 +01:00
|
|
|
Objects.equals(this.unsubscribe, other.unsubscribe) &&
|
|
|
|
|
Objects.equals(this.autocrypt, other.autocrypt) &&
|
2019-02-26 11:05:21 +01:00
|
|
|
Objects.equals(this.headers, other.headers) &&
|
|
|
|
|
Objects.equals(this.raw, other.raw) &&
|
|
|
|
|
Objects.equals(this.subject, other.subject) &&
|
|
|
|
|
Objects.equals(this.size, other.size) &&
|
2019-09-30 21:00:28 +02:00
|
|
|
Objects.equals(this.total, other.total) &&
|
2019-07-24 14:49:55 +02:00
|
|
|
Objects.equals(this.attachments, other.attachments) &&
|
2018-10-15 10:05:42 +00:00
|
|
|
this.content == other.content &&
|
2020-03-26 13:29:43 +01:00
|
|
|
Objects.equals(this.language, other.language) &&
|
2019-05-04 20:52:21 +02:00
|
|
|
Objects.equals(this.plain_only, other.plain_only) &&
|
2020-01-18 11:28:37 +01:00
|
|
|
Objects.equals(this.encrypt, other.encrypt) &&
|
|
|
|
|
Objects.equals(this.ui_encrypt, other.ui_encrypt) &&
|
2019-02-26 11:05:21 +01:00
|
|
|
Objects.equals(this.preview, other.preview) &&
|
2020-01-18 11:28:37 +01:00
|
|
|
this.signature.equals(other.signature) &&
|
2019-02-26 11:05:21 +01:00
|
|
|
Objects.equals(this.sent, other.sent) &&
|
2018-08-02 13:33:06 +00:00
|
|
|
this.received.equals(other.received) &&
|
2018-09-07 15:12:43 +00:00
|
|
|
this.stored.equals(other.stored) &&
|
2018-08-02 13:33:06 +00:00
|
|
|
this.seen.equals(other.seen) &&
|
2018-11-24 19:14:28 +01:00
|
|
|
this.answered.equals(other.answered) &&
|
2018-09-07 15:12:43 +00:00
|
|
|
this.flagged.equals(other.flagged) &&
|
2019-02-26 11:05:21 +01:00
|
|
|
Objects.equals(this.flags, other.flags) &&
|
2018-11-26 11:30:04 +01:00
|
|
|
Helper.equal(this.keywords, other.keywords) &&
|
2019-07-06 10:16:42 +02:00
|
|
|
this.notifying.equals(other.notifying) &&
|
2018-10-15 10:05:42 +00:00
|
|
|
this.ui_seen.equals(other.ui_seen) &&
|
2018-11-24 19:14:28 +01:00
|
|
|
this.ui_answered.equals(other.ui_answered) &&
|
2018-09-07 15:12:43 +00:00
|
|
|
this.ui_flagged.equals(other.ui_flagged) &&
|
2018-08-11 08:28:54 +00:00
|
|
|
this.ui_hide.equals(other.ui_hide) &&
|
2018-09-07 15:12:43 +00:00
|
|
|
this.ui_found.equals(other.ui_found) &&
|
2018-10-16 11:29:12 +00:00
|
|
|
this.ui_ignored.equals(other.ui_ignored) &&
|
2019-01-07 15:05:24 +00:00
|
|
|
this.ui_browsed.equals(other.ui_browsed) &&
|
2020-05-19 12:46:35 +02:00
|
|
|
Objects.equals(this.ui_busy, other.ui_busy) &&
|
2019-02-26 11:05:21 +01:00
|
|
|
Objects.equals(this.ui_snoozed, other.ui_snoozed) &&
|
2020-05-19 12:46:35 +02:00
|
|
|
this.ui_unsnoozed.equals(other.ui_unsnoozed) &&
|
2019-05-15 11:10:47 +02:00
|
|
|
Objects.equals(this.color, other.color) &&
|
2019-04-25 17:35:27 +02:00
|
|
|
Objects.equals(this.revision, other.revision) &&
|
|
|
|
|
Objects.equals(this.revisions, other.revisions) &&
|
2019-02-26 11:05:21 +01:00
|
|
|
Objects.equals(this.warning, other.warning) &&
|
2019-06-25 09:46:31 +02:00
|
|
|
Objects.equals(this.error, other.error) &&
|
|
|
|
|
Objects.equals(this.last_attempt, other.last_attempt));
|
2018-08-02 13:33:06 +00:00
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|