Plain text only with alt content

This commit is contained in:
M66B
2022-02-13 11:36:38 +01:00
parent 125be871be
commit f277f5abeb
11 changed files with 55 additions and 43 deletions

View File

@@ -181,7 +181,7 @@ public class EntityMessage implements Serializable {
@NonNull
public Boolean content = false;
public String language = null; // classified
public Boolean plain_only = null;
public Integer plain_only = null; // 1=true; 0x80=alt
public Boolean resend = null;
public Integer encrypt = null;
public Integer ui_encrypt = null;
@@ -257,6 +257,14 @@ public class EntityMessage implements Serializable {
return "<" + UUID.randomUUID() + "@" + domain + '>';
}
boolean isPlainOnly() {
return (this.plain_only != null && (this.plain_only & 1) != 0);
}
boolean hasAlt() {
return (this.plain_only != null && (this.plain_only & 0x80) != 0);
}
boolean replySelf(List<TupleIdentityEx> identities, long account) {
Address[] senders = (reply == null || reply.length == 0 ? from : reply);
if (identities != null && senders != null)