In my imaginary world where all stanzas have UUIDs there would be no need for 
anyone else to add their own id because every stanza already has a unique id 
which is suitable for referencing in various archives (and the risk of 
collisions is acceptably close to zero.) Of course, that depends on trusting 
that everybody else is both competent and not malicious; while that is true 
most of the time, we still have to cover for the few times that it's not.

So, everyone adds their own id because they can't trust anyone else's ids, 
though those are still useful for referencing with the entities who added them. 
We should still aim to limit revealing ids to places where they are relevant, 
rather than piling multiple ids everywhere just because someone in the chain 
wanted one for their own purposes. I don't care what id you're using to store 
messages in your local archive, I could not use that information even if I 
wanted to, and arguably it's a data leak.


If I send a message to the MUC:

<message id='uuid_001' from='me@myserver/rsrc' to='muc@anotherserver' 
type='groupchat'>
  <body>...</body>
</message>

Then I should receive back:

<message id='uuid_003' from='muc@anotherserver/tedd' to='me@myserver/rsrc' 
type='groupchat'>
  <body>...</body>
  <origin-id id='uuid_001'>
  <stanza-id id='uuid_002'>
</message>

I can cross-reference with the original message I sent using origin-id 
(uuid_001) because that is the id I used.
I can reference a message in the MUC by using stanza-id (uuid_002) because that 
is the id the MUC used.
If I want to reference a message in my server's archive, I can use message.id 
(uuid_003) because that is the id my server used; if there is no server archive 
then stanza-id.id will be the same as message.id (and stanza-id is duplication, 
but included for simplicity.)

And you should receive:

<message id='uuid_004' from='muc@anotherserver/tedd' to='you@yourserver/dvce' 
type='groupchat'>
  <body>...</body>
  <stanza-id id='uuid_002'>
</message>

You can't reference the original message I sent, and there is no legitimate 
reason you should.
To reference a message in the MUC, you can use stanza-id (uuid_002).
And to reference a message in your server's archive, use message.id (uuid_004).

Each endpoint should add its own new uuid into message.id, since that's the one 
it recognises for referencing; and stanza-id is added to provide the id used by 
the original sender (the muc), rather than trying to use the same id in two 
different places for different purposes. If you like, there is an implicit 'by' 
on the stanza-id with the value equal to message.from (minus nick.)


Is the above something we can move towards, or are there practical reasons that 
it's not possible/realistic?
And is there a need for yet more ids to be exposed to genuinely interested 
parties?

_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: [email protected]
_______________________________________________

Reply via email to