make sure automatic jmi responses are sent before ack

This commit is contained in:
Daniel Gultsch 2020-05-22 13:22:22 +02:00
parent 685e01e83f
commit 550fbc6d2c
1 changed files with 3 additions and 3 deletions

View File

@ -837,13 +837,13 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
if (Namespace.JINGLE_MESSAGE.equals(child.getNamespace()) && JINGLE_MESSAGE_ELEMENT_NAMES.contains(child.getName())) { if (Namespace.JINGLE_MESSAGE.equals(child.getNamespace()) && JINGLE_MESSAGE_ELEMENT_NAMES.contains(child.getName())) {
final String action = child.getName(); final String action = child.getName();
if (query == null) { if (query == null) {
if (!account.getJid().asBareJid().equals(from.asBareJid())) {
processMessageReceipts(account, packet, query);
}
if (serverMsgId == null) { if (serverMsgId == null) {
serverMsgId = extractStanzaId(account, packet); serverMsgId = extractStanzaId(account, packet);
} }
mXmppConnectionService.getJingleConnectionManager().deliverMessage(account, packet.getTo(), packet.getFrom(), child, remoteMsgId, serverMsgId, timestamp); mXmppConnectionService.getJingleConnectionManager().deliverMessage(account, packet.getTo(), packet.getFrom(), child, remoteMsgId, serverMsgId, timestamp);
if (!account.getJid().asBareJid().equals(from.asBareJid())) {
processMessageReceipts(account, packet, query);
}
} else if (query.isCatchup()) { } else if (query.isCatchup()) {
final String sessionId = child.getAttribute("id"); final String sessionId = child.getAttribute("id");
if (sessionId == null) { if (sessionId == null) {