Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
ktutnik #1
Member since May 2013 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Showing user presence without having to subscribe as friend
Hello everyone,

i developing a website with chat capability. user is categorized with certain groups (one user might categorized by many groups). the problem is whenever a user register (new user) to my website she/he should automatically see appropriate people online on selected group, without having to subscribe as buddy/friend. previously we used chat room to do that, but it has limitation for only 100 users.

is there something i can do with agsxmpp with my problem? or should i install a plugin / or configure something on my chat server (openfire)?
every help highly appreciated

regards
tutnik
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I personally would handle this on the server. When a new user registers then you can populate the contact list of the users.
Openfire stores all users, contacts and subscription in a SQL database. So this are only some SQL database.
Of course you can also write a server plugin for Openfire which listens for new registrations and populates the roster.
Avatar
ktutnik #3
Member since May 2013 · 5 posts
Group memberships: Members
Show profile · Link to this post
thank you for the quick response.

ok, so there is no way to do with client side..

thank you for the idea.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by ktutnik:
ok, so there is no way to do with client side..

there is. I just thought the server side may be much easier ;-)

OnLogin when you get the contact list you can check if the contacts you need are there or not.
If they don't exist then add them and subscribe to them.

XMPP requires always mutual subscription. This means the contact you are adding and subscribe to must approve your subscription. Without the approval you get no presence. This means that the contacts you add must either manual or automatically accept this requests. If they will do so everything will work and the server will start sending you presence.
Avatar
ktutnik #5
Member since May 2013 · 5 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
OnLogin when you get the contact list you can check if the contacts you need are there or not.
If they don't exist then add them and subscribe to them.

yes was thinking about that so..
but i am looking for some more automatic way without subscribing to another user.

Quote by Alex:
XMPP requires always mutual subscription. This means the contact you are adding and subscribe to must approve your subscription. Without the approval you get no presence. This means that the contacts you add must either manual or automatically accept this requests. If they will do so everything will work and the server will start sending you presence.

thank you this words is explain a lot.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS