Hey,
I was hoping to use add_rosteritem together with mod_rest to register users, but it behaves rather strange.
I can for example add user B to user's A roster with subscription "none" and then user A to user's B roster with subscription "both". One would think that in this case both users should have subscription "both", but it's not the case. I don't think it's possible to add 2 users in a single POST request to ensure that they'll have both subscription set to "both", so I'm not really sure it's such a good idea to use add_rosteritem after all...
Is it supposed to work like this?
Cheers,
Szymon
szimek wrote: I was hoping to
I was hoping to use add_rosteritem together with mod_rest to register users, but it behaves rather strange.
I can for example add user B to user's A roster with subscription "none"
That command is administrative, doesn't respect XMPP rules, and that allows the admin to produce an inconsistent state of subscriptions, as you noticed.
You must provide the parameters exactly as you want them to be stored: "both" in both calls.
Thanks. I still have one
Thanks.
I still have one problem though. When subscribing 2 users with each other using add_rosteritem command, I need to call this command twice - once for every user. The issue is that one user receives presence notification from the other user before he receives iq set stanza to add this other user to his roster... Is there any workaround for it?