This commit is contained in:
kosyak 2024-02-28 19:29:20 +01:00
parent 1726fc86e3
commit dd7a1c1bdb

View file

@ -2341,21 +2341,24 @@ public class XmppConnectionService extends Service {
String replyId = reply.getAttribute("id");
if (replyId == null) {
continue;
}
Message replyMessage = null;
for (Message rep : messages) {
if (replyId.equals(rep.getServerMsgId())) {
if (StringUtils.equals(replyId,rep.getServerMsgId())) {
replyMessage = rep;
break;
}
if (replyId.equals(rep.getRemoteMsgId())) {
if (StringUtils.equals(replyId, rep.getRemoteMsgId())) {
replyMessage = rep;
break;
}
if (replyId.equals(rep.getUuid())) {
if (StringUtils.equals(replyId, rep.getUuid())) {
replyMessage = rep;
break;
}
@ -2381,23 +2384,26 @@ public class XmppConnectionService extends Service {
List<Message> restored = databaseBackend.getMessagesByIds(conversation, notFoundReplies.keySet());
for (String id : notFoundReplies.keySet()) {
ArrayList<Message> notFoundRepliesMessages = notFoundReplies.get(id);
if (notFoundRepliesMessages == null) continue;
for (Message m : restored) {
if (id.equals(m.getServerMsgId())) {
for (Message rm : notFoundReplies.get(id)) {
if (StringUtils.equals(id, m.getServerMsgId())) {
for (Message rm : notFoundRepliesMessages) {
rm.setReplyMessage(m, true);
}
break;
}
if (id.equals(m.getRemoteMsgId())) {
for (Message rm : notFoundReplies.get(id)) {
if (StringUtils.equals(id, m.getRemoteMsgId())) {
for (Message rm : notFoundRepliesMessages) {
rm.setReplyMessage(m, true);
}
break;
}
if (id.equals(m.getUuid())) {
for (Message rm : notFoundReplies.get(id)) {
if (StringUtils.equals(id, m.getUuid())) {
for (Message rm : notFoundRepliesMessages) {
rm.setReplyMessage(m, true);
}
break;