On 30.10.2016 08:19, Daniel Gultsch wrote:
> I created a PR[1] to add stanza-ids to archived MAM messages.
> …
> Ejabberd already adds the id (but with a wrong by attribute IIRC) …

I assume ejabberd does/did use the XMPP domain of the service, and not
the user's bare JID, as value of the 'by' attribute?

To be honest, I always assumed that it would be the XMPP domain and not
the bare JID that is put in this case as value of the 'by' attribute.
This would allow clients to simply take the XMPP address from the 'by'
attribute and do a query against this value. I'm not sure if it's
possible to do a MAM query against a bare JID, and if not, then clients
first need to process the value found in the 'by' attribute in some
cases (here: strip the localpart). Which adds extra complexity.

The example you added to XEP-0313 which introduces <stanza-id/>

<message to='[email protected]/balcony'
         from='[email protected]/orchard'
         type='chat'>
  <body>..</body>
  <stanza-id xmlns='urn:xmpp:sid:0'
             by='[email protected]'
             id='28482-98726-73623' />
</message>

does use the bare JID '[email protected]'. The added text does not
specify which value should be there, nor does it provide a rationale.
Remember that examples are not normative. So I think we should at least
specify this in the text. But I'd also like to hear a rationale for
using the bare JID (in this case).

I feel like the XMPP domain should be used here, e.g.:

<message to='[email protected]/balcony'
         from='[email protected]/orchard'
         type='chat'>
  <body>..</body>
  <stanza-id xmlns='urn:xmpp:sid:0'
             by='capulet.lit'
             id='28482-98726-73623' />
</message>

In general XEP-0313 does not clearly state which value should be used
for the 'to' attribute when performing MAM actions on the users archive
using IQs. The examples seem to indicate that 'to' attribute
should(/must?) be omitted, which is akin to what roster operations do.
But shouldn't it also work if a client would use the XMPP domain? I
think this too should be specified in the XEPs text.

- Florian


Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to