powered by Jive Software

Bug in PEP Service, updates to nodes are not pushed to roster contacts

I think i have found a bug in the PEP Service in OF 4.6.4 (may be earlier … last year or at the beginning of this year, cant remember exactly)

I wanted to push geolocation updates with XEP-0080 packets to my PEP, then the contacts on my roster should get update event messages about my published items. This is only done when the node was created until the server gets rebootet or the cache gets flushed…
The pep owner gets all updates by the way but the auto-subscribed contacts not.

The resulting issue seems to be in Node.java on line: 1561 ( getParent() method)
but the root issue should be while loading the leaf nodes from database …

If OF loads the leaf node, the node does not have a parentIdentifier (dont know why, but i guess it should have… only the root node should not have a parent)…

the call chain is:

LeafNode:publishItems > getAffiliatesToNotify() > getParents() … so the affiliations wont be loaded anymore and as a result the contacts wont get any updates about the new items…

i tested a workaround by changing

 if ( parentIdentifier == null) {
...

at the beginning of the method to:

 if ( parentIdentifier == null && parent==null) {
...

This is only a workaround and wont fix the root issue …

Maybe a dev could take a look on this issue?

I’ve made a PR for the workaround: https://github.com/igniterealtime/Openfire/pull/1921

Thanks for reporting this. I’ve raised Openfire - Issues - Ignite Realtime Jira to track this issue.

I agree that finding the cause for the missing parentIdentifier is probably best, but your suggestion seems like a fine workaround.