Problem regarding auto subscribing contacts in chat client using xmpp

Hi,

We are developing a chat client using xmpp,ejabberd and spectrum for
facebook,yahoo and msn. We are facing a problem regarding the
subscription notices from all contacts that are shown when we are logging
in for the first time.We want to auto subscribe these subscriptions but
we could not differentiate between a new add request and subscription
request from contacts(who are already in friends list).
For example:
I have 2 contacts in my yahoo account say 'abc' and 'def'.
So, now When I login into my yahoo account from our chat client, I get
subscription requests from these 2 contacts.But If I get an add request
from the new person say 'xyz'(previously not in contact list), I get the
same subscription request as I get from my other 2 contacts.We want to
auto subscribe people who are already in my contact list(abc,def), but
for the new person(xyz) we want to give a notification for the user.As we
could not differentiate between these requests, we could not auto
subscribe requests from my contacts.

We also tried requesting for the roster, but unless we subscribe our
contacts it is not sending their names in roster.
This problem is only for facebook,yahoo and msn as we are using
transports and spectrum for these 3 services to run.

If any one can suggest any solution, please let me know.

Thanks.

Syndicate content