trim nick from bookmark before checking if it's empty

This commit is contained in:
Daniel Gultsch 2016-06-03 19:24:11 +02:00
parent e26d842549
commit 7398424f3b

View File

@ -504,8 +504,8 @@ public class MucOptions {
public String getProposedNick() { public String getProposedNick() {
if (conversation.getBookmark() != null if (conversation.getBookmark() != null
&& conversation.getBookmark().getNick() != null && conversation.getBookmark().getNick() != null
&& !conversation.getBookmark().getNick().isEmpty()) { && !conversation.getBookmark().getNick().trim().isEmpty()) {
return conversation.getBookmark().getNick(); return conversation.getBookmark().getNick().trim();
} else if (!conversation.getJid().isBareJid()) { } else if (!conversation.getJid().isBareJid()) {
return conversation.getJid().getResourcepart(); return conversation.getJid().getResourcepart();
} else { } else {