[ejabberd] @online@ shared roster patch - interest?

Martin Langhoff martin.langhoff at gmail.com
Mon Feb 23 12:30:54 MSK 2009


Working on the OLPC School Server, I inherited a patch to
mod_shared_roster that implements a couple of extra 'magic' shared
rosters, similar to @all at . The patch I inherited was a mix of P1 and
Collabora work, applies to early 2.0.x versions, and supports

 - @online@ - like @all@ but only shows the users that are online.

 - @recent@ - like @all@ but shows only users with activity in the
last 7 days (should change to be configurable)

 - @nearby@ - I wish I knew that this does

I have now ported part of this patch to 2.0.3 -- specifically,
@online@ works. The patch is still carries some cruft, and I am
wondering whether it's worth it to polish it into a more elegant patch
that implements @online at .

The key question is: If I bring it to a decent level, is it a
desirable patch? Or is it just a bad idea to implement it as @online@,
perhaps it requires a different approach, for example a "show only
online" option to all shared rosters? (In which case, @all@ with that
switch would behave just like @online@ today).

If it is a desirable patch, can work on it tomorrow and post something
for review. Time is tight on my side, so say something :-)

I absolutely won't take offence if you tell me that the patch is not
desirable for ejabberd or that my code is utter sh*t.

The original patch I inherited
http://dev.laptop.org/git?p=users/martin/ejabberd-xs.git;a=blob;f=recent_online_and_nearby_groups.diff;h=5eedfb195fe4f7da1b9fc643803557cfb4908042;hb=a4fbee5bbb3513418027d95f960c1e44521f1ec6

which was then simplified
http://dev.laptop.org/git?p=users/martin/ejabberd-xs.git;a=blob;f=recent_online_and_nearby_groups_updated.diff;h=7138ad4a1a55dace867b76c683163dfc71d9f4d3;hb=7fa7a0dbf0a9617bb5814fd6449b49bc83f10201

The patch I have today - which could drop lots of superfluous things
as only @online@ works:
http://dev.laptop.org/git?p=users/martin/ejabberd-xs.git;a=blob;f=mod_shared_roster-simplified-online-patch.patch;h=6d707f75fef8be3a6731e81f0960849eade89153;hb=a4afc81e992fd6716c5061a190f6a5b6064281f2

cheers,



martin
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the ejabberd mailing list