diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-05-15 09:55:06 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-05-15 09:55:06 +0200 |
commit | a25912c32cced0683b59bea3095210d76a8d41a6 (patch) | |
tree | 64a5aa867666cea247c658d175a2fc94fe7c21f9 /src/main/java/eu/siacs/conversations/parser/IqParser.java | |
parent | 540f6f3d7a3ad2600f8dc0af238465742070f39e (diff) |
log incoming iq requests
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/IqParser.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/IqParser.java b/src/main/java/eu/siacs/conversations/parser/IqParser.java index 5903d5116..afbc04124 100644 --- a/src/main/java/eu/siacs/conversations/parser/IqParser.java +++ b/src/main/java/eu/siacs/conversations/parser/IqParser.java @@ -268,6 +268,11 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived { @Override public void onIqPacketReceived(final Account account, final IqPacket packet) { + if (Config.EXTENDED_IQ_LOGGING && (packet.getType() == IqPacket.TYPE.GET || packet.getType() == IqPacket.TYPE.SET)) { + Element first = packet.getChildren().size() > 0 ? packet.getChildren().get(0) : null; + Log.d(Config.LOGTAG,account.getJid().toBareJid()+": IQ request from "+packet.getFrom()+(first == null ? "" : " "+first)); + } + if (packet.getType() == IqPacket.TYPE.ERROR || packet.getType() == IqPacket.TYPE.TIMEOUT) { return; } else if (packet.hasChild("query", Xmlns.ROSTER) && packet.fromServer(account)) { |