revert reply fallback handling fix

This commit is contained in:
kosyak 2024-05-22 09:56:57 +02:00
parent ead327d30a
commit 350b36a2d6

View file

@ -880,9 +880,6 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
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"));
@ -891,7 +888,6 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
if (endCodePoint > sb.length()) return sb;
sb.replace(message.body.offsetByCodePoints(0, startCodePoint), message.body.offsetByCodePoints(0, endCodePoint), "");
}
return sb;
}