diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-06-22 12:22:36 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-06-22 12:22:36 +0200 |
commit | 4ba5472d0c56f8cf136a7af780d6bb9d5786229e (patch) | |
tree | 3bd4d9ea14b3280058a9015d0bba22a2ea90c728 /src/main | |
parent | d28d9689859d63d6543ff2b55026fc2db8cb79f6 (diff) |
respond to block list push
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/IqParser.java | 6 |
1 files changed, 6 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 06d4e37e..f5f609db 100644 --- a/src/main/java/eu/siacs/conversations/parser/IqParser.java +++ b/src/main/java/eu/siacs/conversations/parser/IqParser.java @@ -315,6 +315,10 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived { } // Update the UI mXmppConnectionService.updateBlocklistUi(OnUpdateBlocklist.Status.BLOCKED); + if (packet.getType() == IqPacket.TYPE.SET) { + final IqPacket response = packet.generateResponse(IqPacket.TYPE.RESULT); + mXmppConnectionService.sendIqPacket(account, response, null); + } } else if (packet.hasChild("unblock", Xmlns.BLOCKING) && packet.fromServer(account) && packet.getType() == IqPacket.TYPE.SET) { Log.d(Config.LOGTAG, "Received unblock update from server"); @@ -335,6 +339,8 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived { account.getBlocklist().removeAll(jids); } mXmppConnectionService.updateBlocklistUi(OnUpdateBlocklist.Status.UNBLOCKED); + final IqPacket response = packet.generateResponse(IqPacket.TYPE.RESULT); + mXmppConnectionService.sendIqPacket(account, response, null); } else if (packet.hasChild("open", "http://jabber.org/protocol/ibb") || packet.hasChild("data", "http://jabber.org/protocol/ibb")) { mXmppConnectionService.getJingleConnectionManager() |