aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/MucOptions.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/MucOptions.java b/src/main/java/eu/siacs/conversations/entities/MucOptions.java
index beb9612d..2244645b 100644
--- a/src/main/java/eu/siacs/conversations/entities/MucOptions.java
+++ b/src/main/java/eu/siacs/conversations/entities/MucOptions.java
@@ -281,14 +281,13 @@ public class MucOptions {
public String getProposedNick() {
if (conversation.getBookmark() != null
- && conversation.getBookmark().getNick() != null) {
+ && conversation.getBookmark().getNick() != null
+ && !conversation.getBookmark().getNick().isEmpty()) {
return conversation.getBookmark().getNick();
+ } else if (!conversation.getContactJid().isBareJid()) {
+ return conversation.getContactJid().getResourcepart();
} else {
- if (!conversation.getContactJid().isBareJid()) {
- return conversation.getContactJid().getResourcepart();
- } else {
- return account.getUsername();
- }
+ return account.getUsername();
}
}