Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
preky #1
Member since Jan 2006 · 17 posts
Group memberships: Members
Show profile · Link to this post
Subject: Is supposed that addition of new user ot my list...
When I try to add new user to my user list, after calling RosterManager.AddRosterItem should that user be in my user list directory or it will be shown in my user list when that user authorize my request?

What will happen if I call multiple times RosterManager.AddRosterItem for the same user, will it be added as many time as I called that method or just once... does this deppends of Jabber server... or they are all smart so it will add that user just once?

:)
Preky
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello preky,

When you add a new user the server will add this user to your contact list (some database on the server). And send the rosteritem back to you. You will get a OnRosterItem event then. This event contains only this new single rosteritem. Of course when you LogOff and Login this rosterItem is sent to you with the contact list.
When adding a new roster you should also ask the user for subscription. You will get a Presence event if the user accepts or denies your request. And keep in mind that the user could be offline or away from his desk. So the subscription notification could come immediately, later or not at all.
There is code in the MiniClient's add contact form for everything described here.

Alex
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