We are trying to build a feature based on following scenario.
User A registers and logged in to XMPP Server (Openfire in our case) and chat for some time and then logged off.
After some time User ‘B’ registered and logged in to Openfire (User ‘A’ is friend of User ‘B’).
User ‘B’ has User A’s Jabber ID in its Roster.
Now as user ‘A’ is not logged in since long time, user ‘B’ cann’t get its ‘Last Seen/Offline-Online Status’.
We want that user B should get user A’s last status irrespective of whether user A logs in to Openfire after user B’s registration or not. Is there any way to achieve this?
19505-19588/com.appname W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:1 96)
19505-19588/com.appname W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:1 75)
19505-19588/com.appname W/System.err﹕ at org.jivesoftware.smackx.iqlast.LastActivityManager.getLastActivity(LastActivity Manager.java:234)
But until and unless user A accepts subscription request for user B, user B can’t get user A’s ‘Last Seen Status’. We want to overcome this. Without being user A accepts user B’s subscription request, user B should get/fetch/see user A’s ‘Last Seen/Online-Offline Status’. Is there any way possible to achieve this?
Yes, this is normal behavior. XMPP does not allow to see other’s presence information if they didn’t allow you, i.e. if you are not subscribed to their presence.
You probably have to write your own Openfire plugin to do so.