I can reproduce the simple scenario with current ejabberd trunk SVN. But when I try the complex scenario, nobody gets D.
In general, the problem is that when an account is registered in ejabberd, the shared roster must be reevaluated. This is done in mod_register calling the hook 'user_registered'. So, when an account is registered using In-Band Registration, it appears correctly in the rosters of all the other clients.
But the hook is not called when the account is registered using:
- Ad-hoc commands
- ejabberdctl commands
So, when the account is registered with any of those methods the other clients do not get the new user in their rosters.
The solution is quite simple: the hook 'user_registered' must be called in all ways to register an account.