C2S Update Activity (Versioning)
Hi there, just throw a look into ActivityPub but there is not really a clear info about my question.
I created an Object with an create activity (http://localhost:8080/actor1/objectA).
turtle:
<http://localhost:8080/actor1/objectA> a <https://www.w3.org/ns/activitystreams#Object>,
<https://schema.org/Thing>;
<https://www.w3.org/ns/activitystreams#name> "Max";
<https://schema.org/version> "1" .
json-ld:
[
{
"@id": "http://localhost:8080/actor1/objectA",
"@type": [
"https://www.w3.org/ns/activitystreams#Object",
"https://schema.org/Thing"
],
"https://www.w3.org/ns/activitystreams#name": [
{
"@value": "Max"
}
],
"https://schema.org/version": [
{
"@value": "1"
}
]
},
{
"@id": "https://schema.org/Thing"
},
{
"@id": "https://www.w3.org/ns/activitystreams#Object"
}
]
Now i send an update activity that changes the name from “Max” to “Anton”. This has to be a partial update.
But my understanding is (and i think that matches to @pukkamustard content based adressing) that the new object should have a new id.
turtle:
<http://localhost:8080/actor1/v2_objectA> a <https://www.w3.org/ns/activitystreams#Object>,
<https://schema.org/Thing>;
<https://www.w3.org/ns/activitystreams#name> "Anton";
<https://schema.org/version> "2" .
json-ld:
[
{
"@id": "http://localhost:8080/actor1/v2_objectA",
"@type": [
"https://www.w3.org/ns/activitystreams#Object",
"https://schema.org/Thing"
],
"https://www.w3.org/ns/activitystreams#name": [
{
"@value": "Anton"
}
],
"https://schema.org/version": [
{
"@value": "2"
}
]
},
{
"@id": "https://schema.org/Thing"
},
{
"@id": "https://www.w3.org/ns/activitystreams#Object"
}
]
That is how i will implement the update. Does anyone see an incompatibility with the activityPub specification?
I think about it, or rather i wonder if i should concatenate the versions, e.g. like this:
turtle:
<http://localhost:8080/actor1/objectA> a <https://www.w3.org/ns/activitystreams#Object>,
<https://schema.org/Thing>;
<https://schema.org/nextItem> <http://localhost:8080/actor1/v2_objectA>;
<https://www.w3.org/ns/activitystreams#name> "Max";
<https://schema.org/version> "1" .
<http://localhost:8080/actor1/v2_objectA> a <https://www.w3.org/ns/activitystreams#Object>,
<https://schema.org/Thing>;
<https://schema.org/previousItem> <http://localhost:8080/actor1/objectA>;
<https://www.w3.org/ns/activitystreams#name> "Anton";
<https://schema.org/version> "2" .
json-ld:
[
{
"@id": "http://localhost:8080/actor1/objectA",
"@type": [
"https://www.w3.org/ns/activitystreams#Object",
"https://schema.org/Thing"
],
"https://schema.org/nextItem": [
{
"@id": "http://localhost:8080/actor1/v2_objectA"
}
],
"https://www.w3.org/ns/activitystreams#name": [
{
"@value": "Max"
}
],
"https://schema.org/version": [
{
"@value": "1"
}
]
},
{
"@id": "http://localhost:8080/actor1/v2_objectA",
"@type": [
"https://www.w3.org/ns/activitystreams#Object",
"https://schema.org/Thing"
],
"https://schema.org/previousItem": [
{
"@id": "http://localhost:8080/actor1/objectA"
}
],
"https://www.w3.org/ns/activitystreams#name": [
{
"@value": "Anton"
}
],
"https://schema.org/version": [
{
"@value": "2"
}
]
},
{
"@id": "https://schema.org/Thing"
},
{
"@id": "https://www.w3.org/ns/activitystreams#Object"
}
]
I am curious about your opinions