diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-12-19 12:43:09 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-12-19 12:43:09 +0100 |
commit | f05f97251c9a3129db315009cd24759fb2ecd7c0 (patch) | |
tree | 3c7550b3fd1ecf858928c46d5e5d07ce24faf0fe /src/main/java | |
parent | 20b4e756fe4dfcef6cb2158271944db394cad048 (diff) |
prefer server name over address book name when x509 verification is being used
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Contact.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java index f924c05a..ecba70a7 100644 --- a/src/main/java/eu/siacs/conversations/entities/Contact.java +++ b/src/main/java/eu/siacs/conversations/entities/Contact.java @@ -11,6 +11,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; +import eu.siacs.conversations.Config; import eu.siacs.conversations.utils.UIHelper; import eu.siacs.conversations.xml.Element; import eu.siacs.conversations.xmpp.jid.InvalidJidException; @@ -104,10 +105,12 @@ public class Contact implements ListItem, Blockable { } public String getDisplayName() { - if (this.systemName != null) { + if (this.systemName != null && !Config.X509_VERIFICATION) { return this.systemName; } else if (this.serverName != null) { return this.serverName; + } else if (this.systemName != null) { + return this.systemName; } else if (this.presenceName != null) { return this.presenceName; } else if (jid.hasLocalpart()) { |