-
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?
-
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.
-
nicoco
I think this section https://xmpp.org/extensions/xep-0060.html#impl-batch should be removed?
-
nicoco
I wonder if prosody should reply an error instead of handling the first item and silently dropping the other ones though.
-
lovetox
It should
-
lovetox
But also not super important
-
nicoco
not super important but a bit surprising
-
lovetox
Usually you don't check for items that are not of interest to you in payloads
-
lovetox
This comes a bit from the extensibility of xmpp
-
lovetox
singpolyma, where does that "reply to a message creates a new thread" stem from?
-
lovetox
like, which other messenger does that?
-
singpolyma
Slack
-
luca
(And new ms teams)
-
lovetox
just checked slack, weird there is no way to quote a message, the only option is to create a thread
-
lovetox
crazy stuff, you cannot quote anyone :D
-
Holger
Yes!!
-
Holger
I hate precisely that.
-
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
-
lovetox
but what slack has is basically that every message can become a thread with replies, but does not necesserily have to be
-
lovetox
i think its not either or, i would want both things in different situations
-
singpolyma
Indeed. They are different features
-
lovetox
but i wonder is it not just a how you draw the gui thing
-
lovetox
on the protocol level does it really need to behave differently
-
luca
Well no, discord also has inline threads as well as those support board thread channels. They are closely related
-
lovetox
im not seeing inline threads
-
lovetox
but maybe im in the wrong channels
-
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
-
lovetox
yes of course they have different protocol, but i assumed we never need the subroom feature in xmpp
-
lovetox
just the "i create a new thread with a button" thing
-
luca
https://xmpp.lucamatei.com/file_share/01a136c8-2054-777a-991f-5d5d3945bffd/zb2rhkz9H45vtpAEXECtXAoeNGRFbM7KwZQAT4QG8pd7iWu5G.jpg

-
lovetox
instead of only being able to draw a thread by replying
-
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? ↺
-
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
-
lovetox
thanks luca
-
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 ↺
-
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 ↺
-
svp
(except unlike a whisper if you open a thread later you can read the backlog)
-
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
-
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
-
lovetox
i dont see why we need to use the XEP461 replies for that
-
lovetox
and effectively maybe destroying our capability to simply quote messages
-
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 ↺
-
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 ↺
-
lovetox
singpolyma, no you define a GUI thread needs at least 2 messages with the same thread id
-
lovetox
not sure why you would draw a thread when there is only one message
-
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
-
lovetox
i dont understand, i have a message in a view, a second message arrives i draw it inline with the first
-
lovetox
hm loading from the db could bit more tricky
-
lovetox
hm yeah certainly easier with a reply mechanic or correction mechanic
-
lovetox
where i can only load message without reference, and then join all with reference
-
lovetox
but abusing replies for that is bad
-
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
-
lovetox
damn i think i thought this already through
-
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
-
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
-
lovetox
why does it have to be a new thread-id?
-
theTedd
Because it's a new thread and requires a thread-id
-
lovetox
yes, but why not reference the message to which we reply
-
lovetox
i mean we do this with replies, and corrections, why not with a "thread reply"
-
theTedd
spawned-from references that message
-
lovetox
yeah, but why should everyone afterwards not reference it anymore
-
theTedd
Not re-using message ids for threads - there is something about this in Best Practices for Threads
-
theTedd
It's possible, and could work, but as I said it feels a bit unclean (and it was originally my suggestion)
-
lovetox
then all other xeps that reference messages are also unclean, in my opinion
-
lovetox
i dont like that method because its harder to load this from the db, and also it has a problem with race conditions
-
theTedd
Two separate spawned-from on the same message are arguably separate threads (unless they're the same response)
-
lovetox
but that makes no sense in the "reply inline" feature
-
lovetox
there is only one message, and multiple people want to reply inline
-
theTedd
But then there could be inline replies to inline replies? So you'd want to make it a tree anyway
-
lovetox
hmm, i simply would forbid that
-
lovetox
client can do it, but it will just not show up
-
lovetox
and subject and new thread id with quoting initial message, would be the other feature
-
lovetox
but for that simply reply is enough and i attach a new thread to it with potential subject
-
lovetox
but thats weird, why start a thread with a reply, when you can reply inline
-
lovetox
no i start a thread because i attach a thread-id, that i attach a reply to the message can be optional
-
theTedd
Sure, this type of 'threading' is essentially multi-reply (by multiple people)
-
lovetox
hm but then im back to the problem how to load such threads from the database
-
lovetox
ah .. the one that starts the thread needs a different tag, then the ones that reference it
-
lovetox
we should cleanly split, starting a thread, and referencing one
-
lovetox
it would be easier if its not the same tag
-
theTedd
spawned-from is the different tag, which references the message 'replied to" and also defines the thread-id
-
theTedd
All of the other messages in the thread have the same thread-id
-
lovetox
yes, that works, though the replied-to is optional
-
lovetox
sometimes you want a thread that is not spawned from anything
-
theTedd
So that's just a message with a new thread-id
-
lovetox
but it needs to be a different tag
-
lovetox
otherwise its hard to differ in the database if a message is the start of a threat or a reference toit
-
lovetox
and then i need to do gymnastics, like grouping on thread, and sorting and getting the first one and stuff
-
theTedd
<thread-head thread-id="...." [spawned-from-id="...."] />
-
lovetox
adding a reply does the same job as spawned from or
-
lovetox
<thread-head /> and you attach a reply if you feel thats context needed
-
theTedd
Sure
-
lovetox
yeah i think that would work, but essentially is a complete new spec
-
lovetox
having not much to do with todays thread-id
-
lovetox
but maybe thats necessary
-
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
-
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
-
lovetox
i wonder whats the abuse potential
-
lovetox
with that approach i can reuse a thread id, and send a thread-head
-
theTedd
Which is the same as reusing any message id
-
lovetox
hm but i can filter it out by only joining messages that have a later timestamp then the head
-
lovetox
hm still not great
-
theTedd
Or you just merge it into the same thread
-
lovetox
we even could spare the thread-head if we say subject is mandatory, so subject + <thread-id> means new thread
-
lovetox
only <thread-id> means reference to something else
-
lovetox
wait ...
-
lovetox
we could say <subject /> alone is a new thread
-
lovetox
and others that reply need to put <thread-id>message-id</thread-id>
-
theTedd
MUCs already announce a subject
-
lovetox
yeah, how is that relevant?
-
lovetox
is a special message in the join process
-
theTedd
So that becomes the MUC thread?
-
lovetox
but its clearly separated
-
lovetox
this message comes from the MUC itself
-
lovetox
not from a user
-
theTedd
So the same tag has different meanings within the same namespace?
-
lovetox
hm not necessarily
-
lovetox
<subject> is a base element which every party can attach to any message
-
lovetox
its in the base rfc
-
lovetox
its a title, i think comes from email like guis
-
lovetox
it fits perfectly the idea that a message has a title , and therefore becomes a thread
-
theTedd
Yes, it's to set a subject title for 1-to-1 chats, but could carry into MUCs (with appropriate privileges)
-
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
-
theTedd
So then changing subject title mid-thread, but still using the same thread-id?
-
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
-
lovetox
from a GUI perspective, i would not load messages that have <thread-id> initially
-
singpolyma
I use subject + thread ID to set the thread subject/name
-
lovetox
i would only join them
-
lovetox
singpolyma, yeah but is the threadid really necessary?
-
lovetox
because you support creating threads from messages without thread id anywa✎ -
lovetox
because you support creating threads from messages without thread id anyway ✏
-
singpolyma
In order to know which thread you are setting the subject for?
-
lovetox
you dont set it for a thread, i would say only the first message can define a subject
-
lovetox
not the 10th message change it
-
lovetox
that would be a correction of the first
-
singpolyma
I allow changing it, similar to muc
-
lovetox
yeah but you can do this with a correction
-
lovetox
no need to send again a subject or
-
singpolyma
sure. I'm not saying you have to do what I do.
-
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
-
lovetox
to enable, inline reply to any message, and creating new thread with title
-
lovetox
i think these are the 2 things we want
-
lovetox
if we dont want to reuse <subject> because other people use it differently, then 2 new tags
-
lovetox
ok im off, have a good night, or day :)
-
theTedd
If a tag already indicates a new thread, then whether you set a subject then or change it later doesn't really matter