diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-08-01 13:34:30 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-08-01 13:34:30 +0200 |
commit | 11148a4c8b7d4bc56bf35c53141c60cdf2c66b1e (patch) | |
tree | cb8e26cec89137e16f167811fbdf4fb85343ff2e /src/main/java/de | |
parent | 0e5e5cbbf707cc01c110b478eef79266a58c0a70 (diff) |
fixed roster items w/o subscription (request) not being shown
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/IqParser.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/IqParser.java b/src/main/java/de/pixart/messenger/parser/IqParser.java index 5399dbad4..22dccdd2c 100644 --- a/src/main/java/de/pixart/messenger/parser/IqParser.java +++ b/src/main/java/de/pixart/messenger/parser/IqParser.java @@ -59,16 +59,14 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived { contact.setServerName(name); contact.parseGroupsFromElement(item); } - if (subscription != null) { - if (subscription.equals("remove")) { - contact.resetOption(Contact.Options.IN_ROSTER); - contact.resetOption(Contact.Options.DIRTY_DELETE); - contact.resetOption(Contact.Options.PREEMPTIVE_GRANT); - } else { - contact.setOption(Contact.Options.IN_ROSTER); - contact.resetOption(Contact.Options.DIRTY_PUSH); - contact.parseSubscriptionFromElement(item); - } + if ("remove".equals(subscription)) { + contact.resetOption(Contact.Options.IN_ROSTER); + contact.resetOption(Contact.Options.DIRTY_DELETE); + contact.resetOption(Contact.Options.PREEMPTIVE_GRANT); + } else { + contact.setOption(Contact.Options.IN_ROSTER); + contact.resetOption(Contact.Options.DIRTY_PUSH); + contact.parseSubscriptionFromElement(item); } boolean both = contact.getOption(Contact.Options.TO) && contact.getOption(Contact.Options.FROM); if ((both != bothPre) && both) { |