jdev - 2021-07-15


  1. Sam

    Re-posting for a broader audience: is carbons more closely related to message forwarding or history sync? Trying to decide where I would group a message carbons package (because I think the name "carbons" is confusing and makes me think the feature is for sending one message to multiple people), but I'm not sure if it belongs in the "forwarding" package, the "history" package, or somewhere else entirely maybe grouped with one of those two things or maybe on its own?

  2. Sam

    Maybe the concept (and the package) is "delivery" and includes anything related to message delivery options (delay, forwarding, carbons, maybe others)

  3. southerntofu

    hello what's the recommended way for a MUC to redirect a user to another MUC?

  4. southerntofu

    i heard about gone and see-other-host, but does any have better client support?

  5. Sam

    southerntofu: probably by sending a mediated invite and then kicking the user: https://xmpp.org/extensions/xep-0045.html#invite-mediated

  6. pep.

    wut

  7. pep.

    That seems.. ugly

  8. Sam

    For users already in the muc that is. For new joins I think there's a disco field specifically for showing them the new one instead, but I can't remember what it is

  9. southerntofu

    Sam, sooooo the client wouldn't connect automatically to the new addres sright?

  10. southerntofu

    ah that sounds better :)

  11. Sam

    Yah sorry, I was thinking earlier in the process and realized what you meant after.

  12. Sam

    I forget where it's defined; just a second and I'll look

  13. Sam

    Or maybe I'm imagining it, I thought ejabberd had this option anyways

  14. pep.

    prosody uses <gone/> after a room has been destroyed with a redirect jid

  15. southerntofu

    but do clients respect it in practice?

  16. Sam

    Nevermind, the thing I thought exited doesn't. At least, not in the config form for the room I thought I'd seen it in.

  17. southerntofu

    my use-case would be automatically redirecting the user to a specific gateway when the server detects a foreign protocol used on the requested remote service, and knows of a gateway to reach it

  18. southerntofu

    eg. /join #foo@libera.chat would redirect me to #foo%libera.chat@biboumi.MYSERVER or something like that

  19. southerntofu

    :w 36

  20. southerntofu

    (you may treat me as a heretic, i've already received the treatment on IRC-side :P)

  21. southerntofu draw a pentagram in the chan

  22. pep.

    So I've tried to argue that non-stable addresses is meh, already, but they don't want to hear it :P

  23. pep.

    Maybe somebody can help my case

  24. southerntofu also received the treatment from pep. :P

  25. pep.

    (or their case, maybe I'm just wrong about that)

  26. wancat

    Hi, I'm new to XMPP. Is the "resource" column in the JID protocol already deprecated? I am developing a XMPP chatbot which bridges messages to other IM. I want to use resource to identify the user of my service so that I can just create one account for the bot. But I don't see different when I send message to the same account with different resource provided, like user@chat.linchpins.cloud and user@chat.linchpins.cloud/test

  27. MattJ

    wancat: hi! Welcome to XMPP 🙂

  28. MattJ

    The part before the @ identifies the user, the part after the / (the resource) identifies a single session of the user

  29. MattJ

    The resource is certainly not deprecated (at the protocol level), but most people now have multiple devices and they want to receive the same messages on all of them

  30. MattJ

    Also note that sessions (resources) come and go, e.g. as users switch between devices

  31. MattJ

    For a bridge to another network you'll typically want to connect to the server as a "component"

  32. MattJ

    It's a special connection type that allows you to control traffic for a whole domain (usually a subdomain)

  33. MattJ

    If your bridge connects as foo.example.com, it will receive (and can send) messages to/from user@foo.example.com and user2@foo.example.com, etc.

  34. MattJ

    Basically faking as many JIDs as you want, without needing to create a load of accounts on the server

  35. jonas’

    southerntofu, fun idea. I don’t think any client supports <gone/> on MUC join and I think <redirect/> neither

  36. jonas’

    but maybe you can get them to :)

  37. jonas’

    (fwiw, <see-other-host/> is a stream error, you are looking for stanza errors)

  38. pep.

    southerntofu, I think I mentioned it but Link Mauve had a similar "problem" for his XMPP<->AP on prosody

  39. wancat

    MattJ: Thanks for your replies! Very helpful

  40. Squeaky Latex Folf

    > MattJ wrote: > The resource is certainly not deprecated (at the protocol level), but most people now have multiple devices and they want to receive the same messages on all of them How would you send a message to all resources then? Just by not specifying the resource?

  41. MattJ

    Yeah, the recommended approach these days is to send to the bare JID (no resource)

  42. MattJ

    But even if you send directly to a resource (which is still most clients today), it will get copied to all sessions that opt-in via XEP-0280 (carbons)

  43. MattJ

    XMPP was one of the first messaging protocols to support multiple concurrent devices, we thought we were so smart... magically routing the messages to the right device. Then everyone went mobile, bandwidth became cheap, and everyone wants everything everywhere :)

  44. flow

    tbh, I am not sure if it was smart to *not* fan out per default from the very beginning

  45. flow

    but, 1. you specificy, 2. you code, 3. you use, goto 1

  46. MattJ

    Well, fanning out was allowed by the spec in the bare JID case. Resource locking was probably encouraged by notification issues, and a desire to not have half a conversation on other devices.

  47. MattJ

    The fix for half a conversation would require copying outgoing messages also, which is quite a leap

  48. StropheNoob

    Hi everyone. Hoping to learn some things hopefully quickly. Glad I found this group.

  49. StropheNoob

    I'm writing some simple C programs based on libstrophe. I'm trying to accomplish 3 things: direct message a recipient (done), discover/join available rooms (no clue) and send/receive messages while in a room (see previous task). To test this, I installed ejabberd on my server and have two users with one group set up. I have user_a connected using pidgin/tkabber. user_b needs to connect via my c program. I ordered the definitive guide to XMPP book, but it arrives tomorrow. Does anyone have any initial thoughts on my task?

  50. pep.

    That's how you join a room protocol-wise: https://xmpp.org/extensions/xep-0045.html#enter I don't know libstrophe at all though

  51. pep.

    And welcome :)

  52. StropheNoob

    Is "service discovery" what I should be researching as far as finding out who is online and what rooms are available?

  53. StropheNoob

    My cursory understanding is I just craft a bunch of stanzas that conform to these different xep-### extensions and that's how I get the info I need. Is that correct?

  54. StropheNoob

    * I found it in section 6.3 of the link you sent (thank you)