powered by Jive Software

Quick Question Involving Jabber and Smack

Hello,

I am curently developing a plugin for eclipse which uses the smack api to commnicate with the jabber.org server.

Basically, I am developing my own chat plugin.

I am just curious if anyone knows how adding a new contact would occur? When adding a new contact, if a user enters an email address that does not correspond to an active account, is there a way to tell the user that this contact ID does not exist?

Also, say someone adds you as a contact. Does the Jabber server automatically handle sending requests to the user that is added, so that you can either accept or deny another user’s attempt to add you as a contact? I am guessing that if the Jabber server does already handle this then it will send xmp packets to the other user, and we can parse and use the information accordingly?

Any pointers? Thanks!

Hi,

I don’t think there is a way to tell if another user’s account actually exists, since the other user has to accept the request before you can interact with them.

The Jabber server does in fact handle the accept/deny packets automatically. Smack also handles them automatically by default, but you can process the packets yourself to achieve custom functionality if desired. This is mentioned at the bottom of the Roster and Presence section of the Smack documentation.