diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-12-03 00:00:25 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-12-03 00:06:57 +0100 |
commit | 39a3f372dd7b6d2cd1752c7c755fefe6866bc3c0 (patch) | |
tree | 5f64688cb1aa89162ea235ade0585287d1285b5e /src/main/java/eu/siacs/conversations/entities | |
parent | 9152e1ac95bb51de2189791a552c703cbca59f24 (diff) |
clean up getProposedNick
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/MucOptions.java | 11 |
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(); } } |