mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
fixed very rare npe
This commit is contained in:
parent
937fc51b50
commit
a059dfab2c
@ -27,14 +27,16 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived {
|
|||||||
if (!contact.getOption(Contact.Options.DIRTY_PUSH)) {
|
if (!contact.getOption(Contact.Options.DIRTY_PUSH)) {
|
||||||
contact.setServerName(name);
|
contact.setServerName(name);
|
||||||
}
|
}
|
||||||
if (subscription.equals("remove")) {
|
if (subscription!=null) {
|
||||||
contact.resetOption(Contact.Options.IN_ROSTER);
|
if (subscription.equals("remove")) {
|
||||||
contact.resetOption(Contact.Options.DIRTY_DELETE);
|
contact.resetOption(Contact.Options.IN_ROSTER);
|
||||||
contact.resetOption(Contact.Options.PREEMPTIVE_GRANT);
|
contact.resetOption(Contact.Options.DIRTY_DELETE);
|
||||||
} else {
|
contact.resetOption(Contact.Options.PREEMPTIVE_GRANT);
|
||||||
contact.setOption(Contact.Options.IN_ROSTER);
|
} else {
|
||||||
contact.resetOption(Contact.Options.DIRTY_PUSH);
|
contact.setOption(Contact.Options.IN_ROSTER);
|
||||||
contact.parseSubscriptionFromElement(item);
|
contact.resetOption(Contact.Options.DIRTY_PUSH);
|
||||||
|
contact.parseSubscriptionFromElement(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user