How to have different conflict behavior between registered and anonymous users

Hi everyone,

I'm building a web client (via strophe.js) that enables users to login to my ejabberd host.
My problem is that I want different behaviors when someone wants to login according to the account trying to connect :

  • If the user is anonymous, I don't want anybody to be able to disconnect a connected user -> resource_conflict: closenew
  • If the user is registered, I'm assuming that if he has the good password, he just wants to close the old connection (one left at work for example) -> resource_conflict: closeold

Could someone please tell me what the right way to do this is ?

Thanks in advance,

Regards,
TyR.

Syndicate content