diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-02-02 13:43:20 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-02-02 13:43:20 +0100 |
commit | fab0a45955e04fa3210da651ac74ea6541abadab (patch) | |
tree | 2d05b5b672c3ed0a9aa6183d43419543fbc1e208 /src/main/java/eu/siacs/conversations/entities/Contact.java | |
parent | ba9ba8ffe2ba3ef84ad1ed2adc57ab91e6f8fa73 (diff) |
re-read common name from certificates on startup
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Contact.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java index c2d8b278b..b338656ba 100644 --- a/src/main/java/eu/siacs/conversations/entities/Contact.java +++ b/src/main/java/eu/siacs/conversations/entities/Contact.java @@ -38,6 +38,7 @@ public class Contact implements ListItem, Blockable { protected String systemName; protected String serverName; protected String presenceName; + protected String commonName; protected Jid jid; protected int subscription = 0; protected String systemAccount; @@ -105,8 +106,8 @@ public class Contact implements ListItem, Blockable { } public String getDisplayName() { - if (this.presenceName != null && Config.X509_VERIFICATION) { - return this.presenceName; + if (this.commonName != null && Config.X509_VERIFICATION) { + return this.commonName; } else if (this.systemName != null) { return this.systemName; } else if (this.serverName != null) { @@ -510,6 +511,10 @@ public class Contact implements ListItem, Blockable { return account.getJid().toBareJid().equals(getJid().toBareJid()); } + public void setCommonName(String cn) { + this.commonName = cn; + } + public static class Lastseen { public long time; public String presence; |