I am quite new to XMPP and recently decided to try to make an IM on mobile platform. Regarding XMPP I have several problems which I seems unable to find answer after recent's readings (I am thinking of using ejabberd or Tigase as server, so the following questions will be assuming the server side is one of them):
I've read that in XMPP, adding another user into roster is done by a client sending a roster set request to the server, then the server will add a roster item with subscription state of 'from' and 'to' to the requesting client and the client being added respectively. In other to have the roster item's subscription value to become 'both', the user being added need to accept the request sent. Is this correct?
In my understanding, one user identify and add another user by JID in XMPP, which if I put this into WhatsApp's case, it is the user's phone number. Is this correct?
Is it possible to make server customise client's roster? For example, the server would process all client using the IM, and return a roster based on some logic, e.g. people they might know each other, instead of only user's added contacts? To clarify this more clearly, it is like Facebook's people you might know. So in this case, each time a client log in and request roster, the server will return a list of people the user might find they would like to talk to.
From the understanding before, is it possible that a user A can see if another user B is online or not, given that A sent a request to add B, but B has not yet accepted? How about sending any message to B before B accepted the request?
Thanks for any help!