jdev - 2020-04-14


  1. jcbrand

    Hello, is there a way to check whether a nickname is available *before* joining a MUC? XEP-0045 has a section on discovering whether you've already registerd a nick for yourself in the MUC, but I don't see anything about checking whether a particular nick is available.

  2. pep.

    that would mean having access to the participant list before joining?

  3. pep.

    in a way

  4. Ge0rG

    jcbrand: what's the issue with trying to join with a nickname you want to use?

  5. jcbrand

    Ge0rG: there is no issue, I want users of a particular service that is built on XMPP to be able to check availability of a nickname before actually joining with that nickname.

  6. jcbrand

    pep. I don't think you need the participant list. Could be as simple as sending an IQ to a MUC and asking whether a particular nick is taken or not

  7. Ge0rG

    jcbrand: that's a kind of access to the occupant list. You could enumerate nicknames that way ;)

  8. pep.

    this ^

  9. jcbrand

    Which you maybe don't want in some cases, but in others you don't mind whether someone can enumerate the nicknames

  10. jcbrand

    it's a feature 🙂

  11. pep.

    :/

  12. jcbrand

    Also, if the service tells you that a nick is not available, it might also be due to other reasons, not that it's taken

  13. jcbrand

    Also, if the service tells you that a nick is not available, it might also be due to other reasons, not neccessarily that it's taken

  14. jcbrand

    Also, if the service tells you that a nick is not available, it might also be due to other reasons, not necessarily that it's taken

  15. pep.

    in a world where presence is moot, like the xep you just published, can you not just attempt a join?

  16. pep.

    (it's your xep right?)

  17. jcbrand

    You still get all the presence stanzas initially when you join

  18. jcbrand

    You still get all the presence stanzas initially when you join for the firs ttime

  19. jcbrand

    You still get all the presence stanzas initially when you join for the first time

  20. pep.

    sure, but you know right away if the nick is available or not

  21. pep.

    you get an error otherwise

  22. jonas’

    also you have a "lock" on the nickname at that point

  23. jonas’

    which is good, because someone could steal your nickname between you checking via the IQ and you actually joining

  24. pep.

    right, also that

  25. jcbrand

    Very unlikely and not something worth worrying about IMO

  26. jcbrand

    I think the value of being able to check outweighs that concern in my case

  27. pep.

    I'm saying you already have the tools to check

  28. jcbrand

    Not before you join the room

  29. jonas’

    jcbrand, could you do nickname registration?

  30. pep.

    joining the room is just a technical detail

  31. pep.

    you don't have to show it in the UI right away

  32. jonas’

    pep., it’s not, it discloses the join attempt to everyone and also distributes traffic

  33. jcbrand

    pep. it's a detail that complicates the code and causes unnecessary traffic

  34. jonas’

    pep., it’s not, it discloses the join attempt to everyone and also causes traffic

  35. pep.

    jonas’: if the goal is to join anyway..

  36. jonas’

    you also have to leave the room if the user decides to pick a different nickname after the check and deal with all the stanzas you get after joining

  37. jcbrand

    jonas’ AFAIK you can only register a nick *after* joining the MUC

  38. jonas’

    pep., in my mind, there’s a "pick your username" form where a green tickmark appears when you move focus away from the nickname field. The user could still change the nickname later (before joining) or abort the process.

  39. jcbrand

    Yes, I didn't say that the goal is to join anyway

  40. jcbrand

    You might decide not to join because a particular nick is taken already

  41. pep.

    that's an issue only if the nick isn't already taken

  42. jcbrand

    ?

  43. pep.

    others wouldn't know you tried to join if the nick is already taken as you get an error

  44. jcbrand

    jonas’ what you describe is roughly what I'm after. I think making it possible to allow nick registration without joining a MUC is the solution

  45. jonas’

    jcbrand, you still have to un-register the nickname if the user aborts the flow in some way

  46. jcbrand

    uh yeah of course...

  47. jonas’

    maybe by expiring all nickname registrations which never joined after 5 minutes or something like that

  48. jcbrand

    😛

  49. pep.

    "of course" :p

  50. jcbrand

    Seems a bit kludgy

  51. pep.

    "oops the user quit the client"

  52. jonas’

    (and also explicitly un-registering when the user changes their choice)

  53. jonas’

    jcbrand, not really. having a control loop which does cleanup of (expected and unexpected) error cases is a good thingâ„¢

  54. jcbrand

    I think something like nick registration, but that simply indicates availability is preferable. Could be a new XEP, and if people hate it I might then just do it for this one use-case