Hi all, I am writing a client and I've experienced different behaviors from different servers in handling client's actions such as add / accept / deny subscription requests. What surprised me is that it seems there is no standard behaviors (e.g. processes of treating actions, order of notification messages pushing to the clients...) for the server.
E.g.: - ejabbered 1.1.3 always adds the incoming contact to the user's roster (with the subscription status = 0, means no relationship) before pushing the subscription (add-friend) request to the user. So the client gets two messages: one to notify that there is an item added, the next to notify that there is a subscription request. - meanwhile, openFire 3.3.1 does not add the contact before, so you get only the later message. One (probably) bug I found: even when the client sent a message denying the subscription request, the server still adds the contact to the user's roster (with subscription= 0) Furthermore, with the same actions from the clients, the number and order of messages that the servers send significantly different. E.g. - ejabbered 1.1.3 tends to not to send any message to the contact with subscription = 0. Example: If user B denied a subscription request from user B (means no relationship at the moment), B will not receive the next unsubscription request from A, but with openFire 3.3.1, it will. - Furthermore, I found the order of messages that openFire pushes to the clients rather annoying. For example, if user A removes user B from its roster (and therefore B will also remove A - my implementation), A will receive "unsubscribed" and "unsubscribe" (respectively) from B before received the notification that its removal was done. So you cannot trust that: when you remove a contact from your roster, you won't receive unexpected message from that contact; You also see that contact still in your roster for a while (with subscription = 0). Does any body experience similar problems ? Son.
