prefer server name over address book name when x509 verification is being used

This commit is contained in:
Daniel Gultsch 2015-12-19 12:43:09 +01:00
parent 20b4e756fe
commit f05f97251c
1 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.utils.UIHelper; import eu.siacs.conversations.utils.UIHelper;
import eu.siacs.conversations.xml.Element; import eu.siacs.conversations.xml.Element;
import eu.siacs.conversations.xmpp.jid.InvalidJidException; import eu.siacs.conversations.xmpp.jid.InvalidJidException;
@ -104,10 +105,12 @@ public class Contact implements ListItem, Blockable {
} }
public String getDisplayName() { public String getDisplayName() {
if (this.systemName != null) { if (this.systemName != null && !Config.X509_VERIFICATION) {
return this.systemName; return this.systemName;
} else if (this.serverName != null) { } else if (this.serverName != null) {
return this.serverName; return this.serverName;
} else if (this.systemName != null) {
return this.systemName;
} else if (this.presenceName != null) { } else if (this.presenceName != null) {
return this.presenceName; return this.presenceName;
} else if (jid.hasLocalpart()) { } else if (jid.hasLocalpart()) {