implemented ping (xep-0199) fixed #517

This commit is contained in:
iNPUTmice 2014-10-03 19:24:10 +02:00
parent 131f2aad76
commit 18409946c6

View file

@ -73,6 +73,9 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived {
IqPacket response = mXmppConnectionService.getIqGenerator() IqPacket response = mXmppConnectionService.getIqGenerator()
.discoResponse(packet); .discoResponse(packet);
account.getXmppConnection().sendIqPacket(response, null); 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 { } else {
if ((packet.getType() == IqPacket.TYPE_GET) if ((packet.getType() == IqPacket.TYPE_GET)
|| (packet.getType() == IqPacket.TYPE_SET)) { || (packet.getType() == IqPacket.TYPE_SET)) {