fix replies without callback handling
This commit is contained in:
parent
162b0bf928
commit
ead327d30a
|
@ -875,14 +875,14 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
|
|||
private StringBuilder removeReplyFallback(Message message, Message replyMessage) {
|
||||
StringBuilder sb = new StringBuilder(message.body);
|
||||
|
||||
if (replyMessage != null && replyMessage.edits.isEmpty()) {
|
||||
sb.replace(0, replyMessage.body.codePointCount(0, replyMessage.body.length()) + 3, "");
|
||||
} else {
|
||||
List<Element> replyFallback = message.getFallbacks("urn:xmpp:reply:0");
|
||||
if (replyFallback.isEmpty()) {
|
||||
return sb;
|
||||
}
|
||||
|
||||
if (replyMessage != null && replyMessage.edits.isEmpty()) {
|
||||
sb.replace(0, replyMessage.body.codePointCount(0, replyMessage.body.length()) + 3, "");
|
||||
} else {
|
||||
Element bodyFallback = replyFallback.get(0).findChild("body");
|
||||
int startCodePoint = Integer.parseInt(bodyFallback.getAttribute("start"));
|
||||
int endCodePoint = Integer.parseInt(bodyFallback.getAttribute("end"));
|
||||
|
|
Loading…
Reference in a new issue