diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-05-15 23:26:02 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-05-15 23:26:02 +0200 |
commit | 38c2f81f181bc3f80cad2931ea67eefa59be0fc3 (patch) | |
tree | c73b5af4a302e4df9f40086a605bb4fd2528944c /src/main/java/eu | |
parent | c73425e79a98f99e031d1bfd5f2f79bbd052f74f (diff) | |
parent | a25912c32cced0683b59bea3095210d76a8d41a6 (diff) |
Merge remote-tracking branch 'refs/remotes/siacs/master'
Diffstat (limited to 'src/main/java/eu')
3 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java index 78067b905..1035a6a6c 100644 --- a/src/main/java/eu/siacs/conversations/Config.java +++ b/src/main/java/eu/siacs/conversations/Config.java @@ -87,6 +87,7 @@ public final class Config { public static final boolean DISABLE_HTTP_UPLOAD = false; public static final boolean DISABLE_STRING_PREP = false; // setting to true might increase startup performance public static final boolean EXTENDED_SM_LOGGING = false; // log stanza counts + public static final boolean EXTENDED_IQ_LOGGING = true; // log iq requests public static final boolean RESET_ATTEMPT_COUNT_ON_NETWORK_CHANGE = true; //setting to true might increase power consumption public static final boolean ENCRYPT_ON_HTTP_UPLOADED = false; 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)) { diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 1da05ce5e..18c72d0ca 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -1833,8 +1833,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa final MucOptions mucOptions = conversation.getMucOptions(); final Jid joinJid = mucOptions.getSelf().getFullJid(); Log.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": joining conversation " + joinJid.toString()); - PresencePacket packet = new PresencePacket(); - packet.setFrom(conversation.getAccount().getJid()); + PresencePacket packet = mPresenceGenerator.selfPresence(account, Presence.Status.ONLINE); packet.setTo(joinJid); Element x = packet.addChild("x", "http://jabber.org/protocol/muc"); if (conversation.getMucOptions().getPassword() != null) { @@ -1848,10 +1847,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa // Fallback to muc history x.addChild("history").setAttribute("since", PresenceGenerator.getTimestamp(conversation.getLastMessageTransmitted())); } - String sig = account.getPgpSignature(); - if (sig != null) { - packet.addChild("x", "jabber:x:signed").setContent(sig); - } sendPresencePacket(account, packet); if (onConferenceJoined != null) { onConferenceJoined.onConferenceJoined(conversation); |