[ejabberd] How to maintain a global list of online users (Django + ejabberd)

Theo Cushion theo at jivatechnology.com
Wed Apr 11 14:04:45 MSK 2012


On 28 Mar 2012, at 22:16, Badlop wrote:

> On 26 March 2012 18:34, Pankaj Singh <singh.pankaj.iitkgp08 at gmail.com> wrote:
>> Hi,
>> 
>> I am writing a facebook application using django with one to one chat
>> feature. I am using a python script to authenticate users to ejabberd
>> server  in background. Once user is connected to xmpp server, I want
>> to recommend him 10 online users to chat with. But I am not able to
>> come up with a nice implementation.
> 
> Check the ejabberd Guide about mod_shared_roster
> and try the @online@ special member.
> 
> To satisfy your requirement, you would only need to modify the source code
> to show in the roster only 10 online users, instead of all the online users.

We use https://github.com/theozaurus/mod_eventful to make a call out to our web app every time someone goes on or offline. It's not as clean as modifying mod_shared_roster, but it might help you out.

>> 
>> One method can be to store updated list of JID of all online users in
>> memcached or redis and recommend from here. Here I need to update the
>> list whenever some one comes online or goes offline. Is there a way to
>> get JID of user after authenticating from python script ?
> 
> 
> ---
> Badlop

Theo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120411/5374484a/attachment.html>


More information about the ejabberd mailing list