From f05f97251c9a3129db315009cd24759fb2ecd7c0 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 19 Dec 2015 12:43:09 +0100 Subject: [PATCH] prefer server name over address book name when x509 verification is being used --- src/main/java/eu/siacs/conversations/entities/Contact.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java index f924c05a1..ecba70a77 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()) {