WP_Post to ActivityPub-Object Transformer scope #5

Open
opened 2023-11-30 18:44:58 +01:00 by linos · 5 comments
Owner

Maybe the transformer should not be able to control certain fields of the objects:

  • id
  • url
  • published
  • updated

Also id is currently fetched from get_permalink, but maybe the internal guid of wordpress would make more sense, because permalinks might change.

Maybe the transformer should not be able to control certain fields of the objects: - id - url - published - updated Also id is currently fetched from get_permalink, but maybe the internal guid of wordpress would make more sense, because permalinks might change.
Author
Owner

Question: Why isn't the WordPress internal guid of each post used as the id? Currently the permalink is used, which might change and is not unique to a post.

Question: Why isn't the WordPress internal guid of each post used as the `id`? Currently the permalink is used, which might change and is not unique to a post.
Owner

I think the transformer should be able to control it, but it should be easier to not control it (setting defaults somehow).

regarding the id: if i read this document right, it should be a IRI, so just the internal guid isn't enough, maybe in combination with the domain

I think the transformer should be able to control it, but it should be easier to not control it (setting defaults somehow). regarding the id: if i read [this](https://www.w3.org/TR/json-ld/#iris) document right, it should be a IRI, so just the internal guid isn't enough, maybe in combination with the domain
Author
Owner

Look at the WordPress queries. Each guid can be queried directly via an http request.

I actually meant that, but did not write it that way:

"id": "http://wp.lan/?p=<guid>"
Look at the WordPress queries. Each guid can be queried directly via an http request. I actually meant that, but did not write it that way: ```json "id": "http://wp.lan/?p=<guid>" ```
Owner

let's do that!

let's do that!
Author
Owner

Issue has been discussed a lot with upstream developers. This won't be prioritized now, more important is to find a good permanent non-changeable id for each post, e.g. for the post type page the changeable permalink is used as guid.

Issue has been discussed a lot with upstream developers. This won't be prioritized now, more important is to find a good permanent non-changeable id for each post, e.g. for the post type `page` the changeable permalink is used as `guid`.
linos added the
Enhancement
label 2024-01-13 15:58:02 +01:00
linos added this to the 2. Alpha Phase project 2024-01-13 15:58:13 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Event-Federation/wordpress-activitypub#5
No description provided.