jdev - 2024-01-18

  1. latex

    Hey all, I just noticed that adhoc commands from ejabberd in MUCs can be retrieved using the following stanza layout: <iq xmlns="jabber:client" to="groupchat@muc.example.net" type="get" id="random-id"> <query xmlns="http://jabber.org/protocol/disco#items" node="http://jabber.org/protocol/commands" /> </iq> Now I wonder, what is this xmlns="jabber:client" thing? Without it, adhoc commands from MUCs don't get listed at all. This explains why Psi+ cannot see any MUC commands, while Cheogram and Gajim can.

  2. latex

    Which XEP mentions this xmlns="jabber:client" thing?

  3. Zash


  4. latex

    But what does xmlns="jabber:client" have to do inside an iq stanza to query MUC commands?

  5. Zash

    Every stanza a client sends has xmlns="jabber:client"

  6. latex

    For real?

  7. latex

    So Psi+ is not compliant?

  8. latex

    But why every stanza? Isn't this xmlns already defined at the start of a stream? XMPP is a stateful protocol right?

  9. latex

    I don't see xmlns="jabber:client" inside the MUC XEP either

  10. latex

    In the examples at least

  11. latex

    Where is it stated that every stanza is required to have it?

  12. Zash

    It's normally assumed to be the default namespace, inherited from the stream, sure.

  13. latex

    So is this an ejabberd bug?

  14. latex

    Or is it required to have xmlns="jabber:client" specifically inside disco iq stanzas?

  15. Zash

    I don't know. Are you entering this in an XML console or something? Could be a quirk with that too.

  16. latex

    No, this is recorded data

  17. latex

    Psi+ doesn't put xmlns="jabber:client" in disco stanzas, but Gajim indeed inserts it in every stanza it sends

  18. Zash

    Every <iq>, <message> or <presence> a client sends must be in the 'jabber:client' namespace, either by explicit xmlns= or implicitly by inheriting xmlns from the stream.

  19. Zash

    In XML it means the same thing.

  20. latex

    So it's a bug in ejabberd?

  21. Zash

    I don't know

  22. latex

    And I think Prosody also has that same behaviour

  23. Zash

    I don't know what you are doing

  24. latex

    I'm going to ask there now

  25. Zash

    > No, this is recorded data Recorded where? How?

  26. latex


  27. latex

    xmlns="jabber:client" can be left out, it's fine

  28. latex

    The real problem was that Psi+ appends "/Muc" to the end of the to attribute for some unknown reason

  29. latex

    So if I fix that bug, Psi+ can enjoy adhoc commands as well

  30. flow

    fwiw, the xmlns declaration at the outermost stanza element is usually redundant

  31. Zash

    usually. except when it's not. :)