[JDEV] Online Roster Group

Steven Brown swbrown at ucsd.edu
Fri Sep 26 20:38:57 CDT 2003

> -----Original Message-----
> From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org] On 
> Behalf Of Ryan L. Hart
> Sent: Friday, September 26, 2003 2:35 PM
> To: jdev at jabber.org
> Subject: [JDEV] Online Roster Group
> I'm using xdb_sql to process roster queries. I would like to 
> return a small group of online users in a separate group so 
> that users have somebody to talk to. This much I'm doing, I 
> return the logged in users with subscription = 'to' in group 
> = 'Logged On'. These online users show up on the client side 
> as expected, but they are all marked as Offline. This is 
> obviously because there was never a corresponding 'from' 
> subscription from the logged in users to this newly logged on 
> user, so the Jabber server never sends the presence 
> information.
> Is there a good solution to this problem? I'm assuming I 
> could have my clients repeatedly request presence for all the 
> users in the 'Logged In' group, but that seems ugly. What 
> about picking up newly logged in users every once in awhile? 
> Would that be just having the client send another roster get 
> request? That's less important though. I really just want 
> the 'Logged In' group to show accurate presence information 
> like all my other groups.

Btw, I just got done (hopefully) hacking Jabber for our use to do
similar: have a set of users on the same server always known to the
client.  I call it promiscuous mode.  A client wanting to have their
presence known to all connected users on the same server sends <presence
type="promiscuous"> and I hacked mod_presence.c to properly handle all
the cases involved with broadcasting presence.  The non-promiscuous
initial available path through mod_presence.c has an additional presence
probe other than the roster s10ns that probes all connected users on the
same server.  The probe response logic understands promiscuous, so all
promiscuous users reply if it's the same server.  Like invisible,
promiscuous presence never makes it to the client looking like that.
It's modified into available presence with a <promiscuous/> tag under it
so that clients that understand promiscuous mode can act accordingly
(like making them appear in the roster or whatever).  I decided not to
modify the roster at the server, as it gives my client more flexibility
as to what it chooses to represent them as, but it could be added pretty

If folks are interested, I could try extracting that patch from the rest
of my changes and post it.  The protocol itself might make a neat JEP,
as I'm sure many folks use Jabber servers for supporting user
communities, and promiscuous mode is rather ideal for that.

More information about the JDev mailing list