aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-07-09 21:27:41 +0200
committerChristian Schneppe <christian@pix-art.de>2018-07-09 21:27:41 +0200
commit80f0627da7824cb4203993e5a72e4202076d4df4 (patch)
treea3390b159c7e659abfecdac976512fc45dd16b2f /src/main/java/de/pixart
parent2fae73c523f5da5da466c4f171039391a5056bcb (diff)
fixed MucOptions.getName()
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/entities/MucOptions.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java
index 2ef23882f..27b318f0c 100644
--- a/src/main/java/de/pixart/messenger/entities/MucOptions.java
+++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java
@@ -2,7 +2,6 @@ package de.pixart.messenger.entities;
import android.annotation.SuppressLint;
import android.support.annotation.NonNull;
-import android.util.Log;
import java.util.ArrayList;
import java.util.Collections;
@@ -384,12 +383,12 @@ public class MucOptions {
String name;
Field roomConfigName = getRoomInfoForm().getFieldByName("muc#roomconfig_roomname");
if (roomConfigName != null) {
- Log.d(Config.LOGTAG, "value of room config name " + roomConfigName.getValue());
name = roomConfigName.getValue();
} else {
List<ServiceDiscoveryResult.Identity> identities = serviceDiscoveryResult.getIdentities();
String identityName = identities.size() > 0 ? identities.get(0).getName() : null;
- if (!conversation.getJid().getEscapedLocal().equals(identityName)) {
+ final Jid jid = conversation.getJid();
+ if (identityName != null && !identityName.equals(jid == null ? null : jid.getEscapedLocal())) {
name = identityName;
} else {
name = null;
@@ -714,8 +713,7 @@ public class MucOptions {
}
public String getName() {
- String mucName = this.conversation.getAttribute("muc_name");
- return conversation.getJid().getEscapedLocal().equals(mucName) ? null : mucName;
+ return this.conversation.getAttribute("muc_name");
}
private List<User> getFallbackUsersFromCryptoTargets() {