jdev - 2022-03-25

  1. sernick

    hey, i've been wanting to play around with writing server components, but i've got a few questions? do i understand it correctly, all stanzas unhandled by the server would get routed to the component?

  2. MattJ

    It's typically based on addressing

  3. MattJ

    So on the server you assign a domain (usually a subdomain) to a component

  4. MattJ

    And the server will forward anything addressed to that domain to the component

  5. MattJ

    So if you set up a WhatsApp bridge on your server at example.com, you could configure the server to give the component the domain "whatsapp.example.com", and then someone could send a message to "+12025550162@whatsapp.example.com" and your component would receive it, and could also send back any replies to the original user from the same address

  6. sernick


  7. sernick

    thanks for the writeup!

  8. sernick

    speaking of that whatsapp example, bridges like that would be tackled with the gateway interaction xep?

  9. MattJ

    sernick, in practice many implementations don't bother with that these days. It's hard to make a generic-but-nice UI on top of bridges. But yeah, it's useful to have handy, especially the address translation part. But don't assume that it's necessary.

  10. MattJ

    That XEP is mostly just informational, because the details of every remote platform will be slightly different. In particular most of the auth stuff there would probably happen via an OAuth flow or equivalent for many integrations today.

  11. qy

    https://xmpp.org/extensions/xep-0100.html interesting. Is this used for any modern chat

  12. MattJ

    qy, cheogram.com implements the addressing flow, which theoretically allows clients to accept phone numbers and convert them to valid JIDs

  13. MattJ

    I'm not sure if it implements any of the others, they're mostly using ad-hoc commands I think. Biboumi being another more modern gateway that is also ad-hoc based for configuration.