[Standards] Clarify meaning of pubsub#item_expire: creation or modification?

goffi goffi at goffi.org
Fri Sep 17 11:22:38 UTC 2021

Le 2021-09-17 11:29, Martin a écrit :
> Hi,
> this question came up when discussing the server side implementation of
> pubsub#item_expire: Is expiry relative to original creation or to last
> modification?
> It looks like both options can make sense, but in most cases, last
> modification is more useful, e.g. when a singleton node is updated or 
> in
> case of redacted blog posts.
> Also, the standard already says, that re-publication were equivalent to
> modification:
>> Note: If a publisher publishes an item with an Item ID and the ItemID
>> matches that of an existing item, the pubsub service MUST NOT fail the
>> publication but instead MUST overwrite the existing item and generate
>> a new event notification (i.e., re-publication is equivalent to
>> modification).
> To implement an absolute deadline of an item, the expiry time is not
> useful anyway, because it is a per node option, not a per item one. In
> such cases, the publisher should remove the node when time comes.
> In any case, the standard should clear about what is intended.
> Patch attached.
> Cheers, Martin
> _______________________________________________
> Standards mailing list
> Info: https://mail.jabber.org/mailman/listinfo/standards
> Unsubscribe: Standards-unsubscribe at xmpp.org
> _______________________________________________

Hi Martin,

there is no notion of "modification" in XEP-0060: an item with an 
existing ID is overwritten by a new item with same ID, not modified. The 
notion of modification has been introduced in XEP-0413 (Order-By) that 
I've authored, because it's useful, but it's not part of XEP-0060.

Thus, in the case of pubsub#item_expire, it can only reference the date 
of items creation (so if item A' with the same ID as item A is 
published, it's the date of A' creation which is used, and A doesn't 
exist anymore).


More information about the Standards mailing list