Unique activity IDs
-
Is there a requirement that an activity ID be unique?
Reason why I ask is it seems prudent to save a list of encountered activities, and drop those that have been seen before.
However that caused me to run head-first into a NodeBB regression because we ourselves don't actually send unique activity IDs.
For example, a
Follow-Undo(Follow)-Follow
chain would have the twoFollow
s with the same ID, since we just construct them ad-hoc based on request data.Easy fix is to throw in a timestamp there, but it got me wondering about whether there were uniqueness expectations at all, or whether I was being overzealous in checking for it.
-
@julian That's… an excellent question.
So the requirement as I understand it is that the id must be publicly resolvable, which would imply a uniqueness constraint.
Still, the verbage doesn't say that it must be a publicly resolvable _to the object in question_ IIRC? I'd have to look this up to confirm it and am not in a position to do so right now, but that's an interesting question.
-
@julian there is absolutely a uniqueness expectation in there.
-
@julian Yes, IDs should be unique:
>All Objects in [ActivityStreams] should have unique global identifiers. ActivityPub extends this requirement; all objects distributed by the ActivityPub protocol MUST have unique global identifiers, unless they are intentionally transient