From 18409946c638269d2c0b0b3f74d9f9f7258d7962 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Fri, 3 Oct 2014 19:24:10 +0200 Subject: [PATCH] implemented ping (xep-0199) fixed #517 --- src/eu/siacs/conversations/parser/IqParser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/eu/siacs/conversations/parser/IqParser.java b/src/eu/siacs/conversations/parser/IqParser.java index 592b77a45..3cf76f602 100644 --- a/src/eu/siacs/conversations/parser/IqParser.java +++ b/src/eu/siacs/conversations/parser/IqParser.java @@ -73,6 +73,9 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived { IqPacket response = mXmppConnectionService.getIqGenerator() .discoResponse(packet); account.getXmppConnection().sendIqPacket(response, null); + } else if (packet.hasChild("ping","urn:xmpp:ping")) { + IqPacket response = packet.generateRespone(IqPacket.TYPE_RESULT); + mXmppConnectionService.sendIqPacket(account, response, null); } else { if ((packet.getType() == IqPacket.TYPE_GET) || (packet.getType() == IqPacket.TYPE_SET)) {