1
votes

We are using ejabberd for our chat client and we are using ProcessOne fast reconnect and push Modules.

We have kept session time to 3 minutes mean after 3 minutes if there is no keep alive packet then server will mark that session expired and user will be treated offline.

If I will query that user last activity then server will returns us timeinterval when user was last online. But during session even my app is terminated then If I query last activity it will returns us user as online.

Question: Does ejabberd returns last activity timer based on session or presence ?

As I can see If I just reconnect with ejabberd and do not send any presence in full authentication not on fast rebind. It treat that user as online.

1

1 Answers

0
votes

I am not aware of any XEP that will cover you case. XEP-0012 Last Activity is either enabled or not. If enabled, it stores the last activity on the last unavailable presence.

There is several XEP that allow flagging last activity on presence, but they do not offer storage / query (XEP-0256 - Last Activity in Presence, XEP-0319 - Last User Interaction in Presence)

It looks like your requirements are not covered by any XEP. You would need a custom protocol (and implementation) of a Last activity based on your exact detailed requirements: What are the criteria for last human activity, how to detect them, do we want to update last activity on disconnect, how to disable the last activity, etc. Nothing exist so something custom need to be designed.