show xep-0172 nick only for contacts with mutual presence subscription

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/entities/Contact.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

src/main/java/eu/siacs/conversations/entities/Contact.java 🔗

@@ -116,7 +116,7 @@ public class Contact implements ListItem, Blockable {
 			return this.systemName;
 		} else if (this.serverName != null) {
 			return this.serverName;
-		} else if (this.presenceName != null) {
+		} else if (this.presenceName != null && trusted()) {
 			return this.presenceName;
 		} else if (jid.hasLocalpart()) {
 			return jid.getLocalpart();