So, Alice wants to subscribe to information about Bob's presence and sends a subscription request. The server will send notifications to Bob until he answers yes or no. And now your problem is that the server will not notify Alice if she disconnects, and Bob will respond to the request. In this way, Alice will get Bobs' answer by chance.
If Bob agrees to exchange information about the presence, Alice will notice this on her list - she will see the presence of Bobs (away, idle, ...). Otherwise, she will not know if the request has not yet been completed or if Bob rejected her request.
You can change this change by implementing and adding a custom module to your openfire server. Openfire has an API for this.
This module will respond to confirmation messages and can send a status message for all pending or recently confirmed subscription messages to the subscriber (at each login). Your client code can process these messages and provide this status to the subscriber accordingly.
source share