<message to='knightsguild@muc.example.org' from='knightsguild@muc.example.org/yuri' id='groupchat-id3' type='groupchat'>
<body>Excellent ideas! Let's get right to it!</body>
<reply xmlns='urn:xmpp:reply:1'>
<to id='groupchat-id1' from='knightsguild@muc.example.org/anna' />
</reply>
</message>
Does anyone know what existing clients do when faced with multiple reply elements in a single message? Do they pick the first, last, or do anything with both? My guess is that they'll vary, giving us the XMPP equivalent of Undefined Behaviour - we saw that with MUC codes a few years back when clients often only picked one. Discovering the answer to this will indicate if this would need to be a spec bump or not.There's nothing I noted in the existing spec that stipulates only one reply element can exist in a single message, so it's possible some clients are doing this kind of thing already.Final comment - XML is ordered, so the arrangement attribute is redundant - and prone to other exciting UB, like if there's two at the same rank, or gaps, or...(I have no opinion on whether we should do multi-replies, incidentally - though to be clear, no objections either)On Sat, 28 Jun 2025 at 23:16, Greatsword <gs@greatsword.xyz> wrote:I've seen some IM platforms (namely Revolt and Guilded) have the ability to let the user reference multiple messages in a single reply, which might be a useful feature. I think with the XEP as it currently is, it could be fairly simple to add support for this feature.
I think an addition like this would be good.
"""
Section 3.2 - Multi-Message RepliesA user may want to reply to multiple messages with a single message. This can be done by including many reply elements. Ordering is important, so the reply element MUST include an "arrangement" attribute that counts up from 0, with 0 being displayed at the top in the client UI.
EXAMPLE 5. Yuri replies to both Max's and Anna's messages in a MUC.
```
<message to='knightsguild@muc.example.org' from='knightsguild@muc.example.org/anna' id='groupchat-id1' type='groupchat'>
<stanza-id xmlns='urn:xmpp:sid:0' id='groupchat-id1' />
<body>A fort will keep us safe!</body>
</message>
<message to='knightsguild@muc.example.org' from='knightsguild@muc.example.org/max' id='groupchat-id2' type='groupchat'>
<stanza-id xmlns='urn:xmpp:sid:0' id='groupchat-id2' />
<body>Adoring blue flags for style!</body>
</message>
<message to='knightsguild@muc.example.org' from='knightsguild@muc.example.org/yuri' id='groupchat-id3' type='groupchat'>
<stanza-id xmlns='urn:xmpp:sid:0' id='groupchat-id3' />
<body>Excellent ideas! Let's get right to it!</body>
<reply to='knightsguild@muc.example.org/anna' id='groupchat-id1' arrangement='0' xmlns='urn:xmpp:reply:0' />
<reply to='knightsguild@muc.example.org/max' id='groupchat-id2' arrangement='1' xmlns='urn:xmpp:reply:0' />
</message>
```A fallback for this would work in the same way as the previous section, the main difference is that the fallback would include all referenced messages.
"""
I think it also might be worth considering having some kind of limiter in how many messages can be referenced by one reply - perhaps MUCs that advertise support for replies could indicate in a data form how many references may be one message, and if clients don't self-enforce this, then the MUC could throw a policy violation error and drop the message.
_______________________________________________
Standards mailing list -- standards@xmpp.org
To unsubscribe send an email to standards-leave@xmpp.org_______________________________________________Standards mailing list -- standards@xmpp.orgTo unsubscribe send an email to standards-leave@xmpp.org