powered by Jive Software

Presence status not initially sent to user upon login?


Suppose that user B is on user A’'s roster list. User B sets their status to “Away”. If user A is online, user A will receive a presence packet with the updated status. However, if user A is offline, and comes online later, the initial presence packet sent to user A contains only the “from” attribute, and thus does not convey that user B is “away”. Is this a bug, or proper protocol?



This is a bug/incomplete feature. Ideally we cache all presence update information for all users on the system and then forward that to users as they come online. Currently the server only stores the online/offline status of users.

This is primarily a resource issue: how much data should we retain for each user? Presence packets can be arbitrarily big (with <x> extensions and free form status text) so what is the best balance of information to store?

I think the show state should probably be stored and forwarded, along with perhaps the first x characters of the presence status where x may be configurable by the server admin. <x> information should probably not be stored. I’'ll try and get these into a future release of the server.

Things get more complicated when foreign users (on different jabber domains) are tracked and we try to cache at least some of their presence information as well (potentially all users on the Internet).

I agree with you. The show state and status state should be stored by the server. Capping the length of the status is a good idea to control resources, and it should have minimal effect on the client because most statuses will be relatively short. For example, maybe you could store 20 or 30 characters for the status.

I would think that information would have less importance to be stored.