aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/parser/MessageParser.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-09-12 19:46:20 +0200
committerChristian Schneppe <christian@pix-art.de>2019-09-12 19:46:20 +0200
commit88574e39d27a44bab1555f25dde062b1abf602bc (patch)
tree376b0c3e0bb4d91f5a34d131ee9a2232ecd3eeb6 /src/main/java/de/pixart/messenger/parser/MessageParser.java
parent8857f9341c46ce1294c56bc5c729e126884be10c (diff)
when parsing omemo messages ensure we only find one element
Diffstat (limited to 'src/main/java/de/pixart/messenger/parser/MessageParser.java')
-rw-r--r--src/main/java/de/pixart/messenger/parser/MessageParser.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java
index 601bd1e56..8250bf3b8 100644
--- a/src/main/java/de/pixart/messenger/parser/MessageParser.java
+++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java
@@ -440,7 +440,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
final URL xP1S3url = xP1S3 == null ? null : P1S3UrlStreamHandler.of(xP1S3);
final String oobUrl = oob != null ? oob.findChildContent("url") : null;
final String replacementId = replaceElement == null ? null : replaceElement.getAttribute("id");
- final Element axolotlEncrypted = packet.findChild(XmppAxolotlMessage.CONTAINERTAG, AxolotlService.PEP_PREFIX); //TODO make sure we only have _one_ axolotl element!
+ final Element axolotlEncrypted = packet.findChildEnsureSingle(XmppAxolotlMessage.CONTAINERTAG, AxolotlService.PEP_PREFIX);
int status;
final Jid counterpart;
final Jid to = packet.getTo();