better replies fallback
This commit is contained in:
parent
42d59adc78
commit
9892ff8d77
|
@ -356,7 +356,15 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
|
|||
}
|
||||
|
||||
public Message reply() {
|
||||
Message m = new Message(conversation, QuoteHelper.quote(MessageUtils.prepareQuote(this)) + "\n", ENCRYPTION_NONE);
|
||||
Message m;
|
||||
String name = getAvatarName();
|
||||
|
||||
if (name != null && !name.isEmpty()) {
|
||||
m = new Message(conversation, QuoteHelper.quote("<" + name + ">" + "\n" + MessageUtils.prepareQuote(this)) + "\n", ENCRYPTION_NONE);
|
||||
} else {
|
||||
m = new Message(conversation, QuoteHelper.quote(MessageUtils.prepareQuote(this)) + "\n", ENCRYPTION_NONE);
|
||||
}
|
||||
|
||||
m.addPayload(
|
||||
new Element("reply", "urn:xmpp:reply:0")
|
||||
.setAttribute("to", getCounterpart())
|
||||
|
|
Loading…
Reference in a new issue