aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities/Contact.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities/Contact.java')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Contact.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java
index 8fa91b02..9a827f85 100644
--- a/src/main/java/eu/siacs/conversations/entities/Contact.java
+++ b/src/main/java/eu/siacs/conversations/entities/Contact.java
@@ -78,14 +78,16 @@ public class Contact implements ListItem {
public String getDisplayName() {
if (this.systemName != null) {
- return this.systemName;
- } else if (this.serverName != null) {
- return this.serverName;
+ return this.systemName;
+ } else if (this.serverName != null) {
+ return this.serverName;
} else if (this.presenceName != null) {
- return this.presenceName;
+ return this.presenceName;
+ } else if (jid.hasLocalpart()) {
+ return jid.getLocalpart();
} else {
- return jid.getLocalpart();
- }
+ return jid.getDomainpart();
+ }
}
public String getProfilePhoto() {