jdev - 2024-08-11


  1. moparisthebest

    singpolyma: there's neither a success nor error response to bidi

  2. moparisthebest

    You could definitely just... Not use one of them, but that's the only option I see here unless I'm missing something which is highly possible

  3. jonas’

    so. hm. When a server sends me stanzas before XEP-0198 <enabled/>, those stanzas aren't being counted... and they are potentially addressed to a different resource than the resource I'm going to have after resume.

  4. jonas’

    so. hm. When a server sends me stanzas before XEP-0198 <resumed/>, those stanzas aren't being counted... and they are potentially addressed to a different resource than the resource I'm going to have after resume.

  5. jonas’

    that is somewhat weird.

  6. jonas’

    oh but I wouldn't *bind* on stream I intend to resume, right?

  7. Zash

    how can you have a resource before you resumed?

  8. jonas’ goes to re-read startup logic

  9. Zash

    bind and resume ought to be mutually exclusive

  10. jonas’

    indeed

  11. jonas’

    sensible, my fault ten.

  12. jonas’

    sensible, my fault then.

  13. singpolyma

    This has the fun side effect that if you use bind2 you *must* inline sm into it in order to use sm at all

  14. Zash

    That seems reasonable, no?

  15. singpolyma

    Yeah it's fine, just unexpected. Definitely bit me when implementing

  16. jonas’

    so how does that work with s2s-SM?

  17. jonas’

    there's no bind you'd do before resuming, is there?

  18. Zash

    there's no bind in s2s no

  19. Zash

    as the RFC (core) intended! <stream:features/> without mandatory features indicates negotiation is completed

  20. Zash

    c2s is the weird one with the super weird <iq> before it's legal to send <iq>

  21. jonas’

    Zash, but you can't make SM mandatory because you don't know whether the other side is willing/able to resume.

  22. jonas’

    Zash, but you can't make SM mandatory because you don't know whether the other side is willing/able to resume or enable it in the first place, can you?

  23. Zash

    jonas’, SM already has a way to negotiate resumability, presumably included in the BIND2 binding?

  24. jonas’

    is bind2 relevant for s2s?

  25. singpolyma

    I don't think so

  26. Zash

    can you do sm(2) without bind2?

  27. singpolyma

    sm without bind2 surely. I don't know about an sm2?

  28. Zash

    Hm, can't think of what might be relevant. s2s doesn't do as many things on startup anyway, so the sasl2/bind2 things aren't as relevant

  29. dwd

    > You are a server that supports bidi ( https://xmpp.org/extensions/xep-0288.html ), you get 2 incoming s2s connections from example.org (maybe multiple nodes in a cluster... Doesn't matter why), they both enable bidi... > > Now you have 2 outgoing streams for messages to example.org... which do you send messages out? Or duplicate messages to both 😈 ? Does anything specify this? cc dwd No, you have two streams which will accept outgoing messages; which (if any) you use is up to you. Simpler example: You open an outbound stream, and get an inbound stream. Both are bidi-enabled. Either could be used for outgoing messages, you can receive inbound message on either. Now, using both has some *really* interesting problems to solve, because you're bound to ensure ordering is maintained, so you'll need to send messages from a particular stream outbound on the same stream. But it's theoretically possible to do safely.

  30. dwd

    > am I seeing this right that XEP-0114 does not use RFC 6120 XML streams? The examples given have the initiating entity not send a version tag; this would mean that not sending features is correct. I think some servers will send features over XEP-0114 if they receive a version tag. Metre certainly does (unless you tell it not to), and allows components to do starttls, for example.

  31. dwd

    But the node.js component thingy sends a version tag *but also* chokes if it sees features, hence why I had to make that configurable in Metre.

  32. Zash

    The same node.js component thingy that chockes if you send it a disco#info query?

  33. Zash

    The same node.js component thingy that chocked if you send it a disco#info query? (I think it got fixed tho)

  34. Zash

    Or was it xep-199 ping?

  35. dwd

    Probably. I only came across it because of the matrix-bifrost bridge, which seems pretty flakey to me.

  36. Zash

    FWIW re bidi, I think Prosody will in most cases pick the oldest s2sout for outgoing stanzas, be that a regular outgoing s2s or a bidi-enabled incoming. It's still kinda new and doesn't have any more fancy handling than that yet.