jdev - 2021-10-18


  1. Link Mauve

    Zash, don’t we “just” need a stream feature for that?

  2. Link Mauve

    <stream:features>[…]<i-do-support-XML-namespaces-properly xmlns='urn:xmpp:tmp:yeah-really'/></stream:features>

  3. Link Mauve

    Then the client can do all the optimisations it wants.

  4. Zash

    What, negotiation in the application layer? Can't have that, it must be a .. DNS record? TLS extension? JSON file at a special HTTPS location?! /s

  5. Link Mauve

    :D

  6. flow

    isn't support of XML namespaces simply required in XMPP? I know there is the discussion around namespaces attributes, but those are either used or not

  7. jonas’

    flow, last time I checked at least ejabberd broke when I declared the stream management namespace on the stream header

  8. Link Mauve

    flow, last time we had this discussion, people mentioned implementations which (used to?) didn’t support them properly.

  9. jonas’

    (and then attempted to use it)

  10. Link Mauve

    I also saw scary parent.getChild('child') calls in many popular clients, meaning namespaces aren’t checked properly.

  11. Kev

    Depending on what `getChild` does, mind. In M-Link that’s a shorthand for `parent.getChild(‘child’, parent.getNamespace())`

  12. Link Mauve

    That’s nicer than parent.getChild('child', ns::DONT_CARE). ;_;

  13. Zash

    Some would say Explicit > Implicit

  14. Kev

    Zash: I agree - it’s better to explicitly say “I want a different namespace from the parent”, rather than it being implicit in a small change in an always-passed string ;)

  15. jonas’

    Link Mauve, don't look at what util/stanza.lua does.

  16. jonas’

    it will make your head hurt.

  17. flow

    jonas’, I see. Would be great if we could improve the situation. did you create an issue report?

  18. Zash

    It should be doing the same `parent.getChild(‘child’, parent.getNamespace())` thing

  19. jonas’

    flow, I don't recall, it's been a while :)

  20. jonas’

    Zash, there are some nasty corner cases around xmlns=nil in prosody.

  21. Zash

    True

  22. jonas’

    re-implementing that is one of the reasons stanza.rs is more terrible than it would have to be ;).

  23. Zash

    Wasn't that because of the concept of a "default namespace", which differs depending on c2s vs s2s etc?

  24. Kev

    In XMPP we always need either the same ns as the parent, or an explicit namespace, so I’m happy with what we’ve got.

  25. jonas’

    Zash, yep.

  26. jonas’

    I think some token which is not a valid nsuri to represent that, instead of nil, would be great.

  27. Zash

    Perhaps