mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Show whether identities are anonymous, unknown, or verified.
Dev task #52. Known but unverified identities are also supported, but currently unused. These will be used in future for contacts who've been introduced but not verified face to face.
This commit is contained in:
@@ -7,6 +7,8 @@ import java.io.UnsupportedEncodingException;
|
||||
/** A pseudonym for a user. */
|
||||
public class Author {
|
||||
|
||||
public enum Status { ANONYMOUS, UNKNOWN, UNVERIFIED, VERIFIED };
|
||||
|
||||
private final AuthorId id;
|
||||
private final String name;
|
||||
private final byte[] publicKey;
|
||||
|
||||
@@ -9,16 +9,19 @@ public class MessageHeader {
|
||||
private final MessageId id, parent;
|
||||
private final GroupId groupId;
|
||||
private final Author author;
|
||||
private final Author.Status authorStatus;
|
||||
private final String contentType;
|
||||
private final long timestamp;
|
||||
private final boolean read;
|
||||
|
||||
public MessageHeader(MessageId id, MessageId parent, GroupId groupId,
|
||||
Author author, String contentType, long timestamp, boolean read) {
|
||||
Author author, Author.Status authorStatus, String contentType,
|
||||
long timestamp, boolean read) {
|
||||
this.id = id;
|
||||
this.parent = parent;
|
||||
this.groupId = groupId;
|
||||
this.author = author;
|
||||
this.authorStatus = authorStatus;
|
||||
this.contentType = contentType;
|
||||
this.timestamp = timestamp;
|
||||
this.read = read;
|
||||
@@ -51,6 +54,11 @@ public class MessageHeader {
|
||||
return author;
|
||||
}
|
||||
|
||||
/** Returns the status of the message's author. */
|
||||
public Author.Status getAuthorStatus() {
|
||||
return authorStatus;
|
||||
}
|
||||
|
||||
/** Returns the message's content type. */
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
|
||||
Reference in New Issue
Block a user