jdev - 2026-10-13


  1. nicoco

    Is publishing several pep items in a single IQ a thing? I'm experimenting with batch updating bookmarks and I think only the first item is handled by prosody: I send: ```xml <iq xmlns="jabber:client" type="set" to="test@localhost" from="test@localhost" id="ID"> <pubsub xmlns="http://jabber.org/protocol/pubsub"> <publish node="urn:xmpp:bookmarks:1"> <item id="1@slidge.localhost"> <conference xmlns="urn:xmpp:bookmarks:1"><nick>nicoco</nick></conference> </item> <item id="2@slidge.localhost"> <conference xmlns="urn:xmpp:bookmarks:1"><nick>nicoco</nick></conference> </item> <!-- many other --> ``` Prosody replies: ```xml <iq xmlns="jabber:client" type="result" to="test@localhost" id="ID"> <pubsub xmlns="http://jabber.org/protocol/pubsub"> <publish node="urn:xmpp:bookmarks:1"> <item id="1@slidge.localhost" /> </publish></pubsub></iq> ``` Is my syntax wrong somehow or is not supported? Can I discover in advance if batch-publish is supported or not, or should I rely on the result/pubsub/publish/item id to know which one was actually updated?

  2. nicoco

    oh damn, it's actually forbidden by pubsub since version 1.13, from the changelog: > Removed the notion of batch publishing because it makes information coherence and atom handling excessively difficult.

  3. nicoco

    I think this section https://xmpp.org/extensions/xep-0060.html#impl-batch should be removed?

  4. nicoco

    I wonder if prosody should reply an error instead of handling the first item and silently dropping the other ones though.

  5. lovetox

    It should

  6. lovetox

    But also not super important

  7. nicoco

    not super important but a bit surprising

  8. lovetox

    Usually you don't check for items that are not of interest to you in payloads

  9. lovetox

    This comes a bit from the extensibility of xmpp

  10. lovetox

    singpolyma, where does that "reply to a message creates a new thread" stem from?

  11. lovetox

    like, which other messenger does that?

  12. singpolyma

    Slack

  13. luca

    (And new ms teams)

  14. lovetox

    just checked slack, weird there is no way to quote a message, the only option is to create a thread

  15. lovetox

    crazy stuff, you cannot quote anyone :D

  16. Holger

    Yes!!

  17. Holger

    I hate precisely that.

  18. lovetox

    so in discord its like a sub chat room, which is more of a message board kind of thing, i think useful for a support chat, where every question should be by default open a new thread

  19. lovetox

    but what slack has is basically that every message can become a thread with replies, but does not necesserily have to be

  20. lovetox

    i think its not either or, i would want both things in different situations

  21. singpolyma

    Indeed. They are different features

  22. lovetox

    but i wonder is it not just a how you draw the gui thing

  23. lovetox

    on the protocol level does it really need to behave differently

  24. luca

    Well no, discord also has inline threads as well as those support board thread channels. They are closely related

  25. lovetox

    im not seeing inline threads

  26. lovetox

    but maybe im in the wrong channels

  27. singpolyma

    Discord subrooms have a seperate participant list that you can manually join/part separate from the main room so I think it's protocol different a bit

  28. lovetox

    yes of course they have different protocol, but i assumed we never need the subroom feature in xmpp

  29. lovetox

    just the "i create a new thread with a button" thing

  30. luca

    https://xmpp.lucamatei.com/file_share/01a136c8-2054-777a-991f-5d5d3945bffd/zb2rhkz9H45vtpAEXECtXAoeNGRFbM7KwZQAT4QG8pd7iWu5G.jpg

  31. lovetox

    instead of only being able to draw a thread by replying

  32. Cynthia

    > Discord subrooms have a seperate participant list that you can manually join/part separate from the main room so I think it's protocol different a bit It's a subset of the room's participant, right? ↺

  33. luca

    It looks something like this on discord. You can create a thread attached to a message and it's kind of like a sub room or whatever. Similar to slack afaik

  34. lovetox

    thanks luca

  35. kuyuhi

    > so in discord its like a sub chat room, which is more of a message board kind of thing, i think useful for a support chat, where every question should be by default open a new thread worth noting that discord _also_ has a dedicated "forum" channel type, which explicitly replicates message boards ↺

  36. svp

    >> Discord subrooms have a seperate participant list that you can manually join/part separate from the main room so I think it's protocol different a bit > > It's a subset of the room's participant, right? yes, imagine more or less a group whisper in a MUC ↺

  37. svp

    (except unlike a whisper if you open a thread later you can read the backlog)

  38. lovetox

    the question is my first naive approach protocol wise would be to mandate that every message has either a new thread-id or the thread-id which i want to send the message to

  39. lovetox

    this would give the option to other people to answer to the thread, and clients to draw a thread gui only if there are at least one reply

  40. lovetox

    i dont see why we need to use the XEP461 replies for that

  41. lovetox

    and effectively maybe destroying our capability to simply quote messages

  42. singpolyma

    > the question is my first naive approach protocol wise would be to mandate that every message has either a new thread-id or the thread-id which i want to send the message to This effectively makes every message a different thread which can be pretty awful in practise with some UIs. Movim used to do this and it was gross for us ↺

  43. singpolyma

    >> Discord subrooms have a seperate participant list that you can manually join/part separate from the main room so I think it's protocol different a bit > > It's a subset of the room's participant, right? Logically yes only because the UI to join the subroom is not accessible unless you join the roim ↺

  44. lovetox

    singpolyma, no you define a GUI thread needs at least 2 messages with the same thread id

  45. lovetox

    not sure why you would draw a thread when there is only one message

  46. singpolyma

    that's tricky in many cases though. You need to be able to change what the first message is based on the second message

  47. lovetox

    i dont understand, i have a message in a view, a second message arrives i draw it inline with the first

  48. lovetox

    hm loading from the db could bit more tricky

  49. lovetox

    hm yeah certainly easier with a reply mechanic or correction mechanic

  50. lovetox

    where i can only load message without reference, and then join all with reference

  51. lovetox

    but abusing replies for that is bad

  52. lovetox

    and now i remember, to make the reference, the idea was to set the thread-id to the message-id you want to start the thread on

  53. lovetox

    damn i think i thought this already through

  54. lovetox

    but this is not backwards compatible to how thread-ids are now set, so would need to be a new <thread> tag or one with a different namespace

  55. theTedd

    It still feels a bit unclean; another way might be to add something like <spawned-from id="..."/> in the message starting the thread, along with defining the new thread-id (the message the thread was spawned from essentially sets the title/subject of the thread, but could be displayed as the first message in the thread too), and then all following messages use the thread-id as normal

  56. lovetox

    why does it have to be a new thread-id?

  57. theTedd

    Because it's a new thread and requires a thread-id

  58. lovetox

    yes, but why not reference the message to which we reply

  59. lovetox

    i mean we do this with replies, and corrections, why not with a "thread reply"

  60. theTedd

    spawned-from references that message

  61. lovetox

    yeah, but why should everyone afterwards not reference it anymore

  62. theTedd

    Not re-using message ids for threads - there is something about this in Best Practices for Threads

  63. theTedd

    It's possible, and could work, but as I said it feels a bit unclean (and it was originally my suggestion)

  64. lovetox

    then all other xeps that reference messages are also unclean, in my opinion

  65. lovetox

    i dont like that method because its harder to load this from the db, and also it has a problem with race conditions

  66. theTedd

    Two separate spawned-from on the same message are arguably separate threads (unless they're the same response)

  67. lovetox

    but that makes no sense in the "reply inline" feature

  68. lovetox

    there is only one message, and multiple people want to reply inline

  69. theTedd

    But then there could be inline replies to inline replies? So you'd want to make it a tree anyway

  70. lovetox

    hmm, i simply would forbid that

  71. lovetox

    client can do it, but it will just not show up

  72. lovetox

    and subject and new thread id with quoting initial message, would be the other feature

  73. lovetox

    but for that simply reply is enough and i attach a new thread to it with potential subject

  74. lovetox

    but thats weird, why start a thread with a reply, when you can reply inline

  75. lovetox

    no i start a thread because i attach a thread-id, that i attach a reply to the message can be optional

  76. theTedd

    Sure, this type of 'threading' is essentially multi-reply (by multiple people)

  77. lovetox

    hm but then im back to the problem how to load such threads from the database

  78. lovetox

    ah .. the one that starts the thread needs a different tag, then the ones that reference it

  79. lovetox

    we should cleanly split, starting a thread, and referencing one

  80. lovetox

    it would be easier if its not the same tag

  81. theTedd

    spawned-from is the different tag, which references the message 'replied to" and also defines the thread-id

  82. theTedd

    All of the other messages in the thread have the same thread-id

  83. lovetox

    yes, that works, though the replied-to is optional

  84. lovetox

    sometimes you want a thread that is not spawned from anything

  85. theTedd

    So that's just a message with a new thread-id

  86. lovetox

    but it needs to be a different tag

  87. lovetox

    otherwise its hard to differ in the database if a message is the start of a threat or a reference toit

  88. lovetox

    and then i need to do gymnastics, like grouping on thread, and sorting and getting the first one and stuff

  89. theTedd

    <thread-head thread-id="...." [spawned-from-id="...."] />

  90. lovetox

    adding a reply does the same job as spawned from or

  91. lovetox

    <thread-head /> and you attach a reply if you feel thats context needed

  92. theTedd

    Sure

  93. lovetox

    yeah i think that would work, but essentially is a complete new spec

  94. lovetox

    having not much to do with todays thread-id

  95. lovetox

    but maybe thats necessary

  96. theTedd

    The 'old way' basically requires adding a new thread-id to every message just in case someone wants to start a thread off it

  97. lovetox

    having a new spec for that, would also solve the problem of other clients destroying the concept because they implemented it differently at some point

  98. lovetox

    i wonder whats the abuse potential

  99. lovetox

    with that approach i can reuse a thread id, and send a thread-head

  100. theTedd

    Which is the same as reusing any message id

  101. lovetox

    hm but i can filter it out by only joining messages that have a later timestamp then the head

  102. lovetox

    hm still not great

  103. theTedd

    Or you just merge it into the same thread

  104. lovetox

    we even could spare the thread-head if we say subject is mandatory, so subject + <thread-id> means new thread

  105. lovetox

    only <thread-id> means reference to something else

  106. lovetox

    wait ...

  107. lovetox

    we could say <subject /> alone is a new thread

  108. lovetox

    and others that reply need to put <thread-id>message-id</thread-id>

  109. theTedd

    MUCs already announce a subject

  110. lovetox

    yeah, how is that relevant?

  111. lovetox

    is a special message in the join process

  112. theTedd

    So that becomes the MUC thread?

  113. lovetox

    but its clearly separated

  114. lovetox

    this message comes from the MUC itself

  115. lovetox

    not from a user

  116. theTedd

    So the same tag has different meanings within the same namespace?

  117. lovetox

    hm not necessarily

  118. lovetox

    <subject> is a base element which every party can attach to any message

  119. lovetox

    its in the base rfc

  120. lovetox

    its a title, i think comes from email like guis

  121. lovetox

    it fits perfectly the idea that a message has a title , and therefore becomes a thread

  122. theTedd

    Yes, it's to set a subject title for 1-to-1 chats, but could carry into MUCs (with appropriate privileges)

  123. lovetox

    i like the idea, that no message starts really a thread, if it becomes a thread is only determined by if someone references the message id in subsequent message

  124. theTedd

    So then changing subject title mid-thread, but still using the same thread-id?

  125. lovetox

    <subject> + <thread-id> would be kind of invalid, i would ignore the subject and treat it as a reference to whatever point thread-id to

  126. lovetox

    from a GUI perspective, i would not load messages that have <thread-id> initially

  127. singpolyma

    I use subject + thread ID to set the thread subject/name

  128. lovetox

    i would only join them

  129. lovetox

    singpolyma, yeah but is the threadid really necessary?

  130. lovetox

    because you support creating threads from messages without thread id anywa ✎

  131. lovetox

    because you support creating threads from messages without thread id anyway ✏

  132. singpolyma

    In order to know which thread you are setting the subject for?

  133. lovetox

    you dont set it for a thread, i would say only the first message can define a subject

  134. lovetox

    not the 10th message change it

  135. lovetox

    that would be a correction of the first

  136. singpolyma

    I allow changing it, similar to muc

  137. lovetox

    yeah but you can do this with a correction

  138. lovetox

    no need to send again a subject or

  139. singpolyma

    sure. I'm not saying you have to do what I do.

  140. lovetox

    i think we are onto something here, but its still not backwards compatible, but it would need only the introduction of one single new reference tag

  141. lovetox

    to enable, inline reply to any message, and creating new thread with title

  142. lovetox

    i think these are the 2 things we want

  143. lovetox

    if we dont want to reuse <subject> because other people use it differently, then 2 new tags

  144. lovetox

    ok im off, have a good night, or day :)

  145. theTedd

    If a tag already indicates a new thread, then whether you set a subject then or change it later doesn't really matter