-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare ?p=<id>
and ?author=<id>
for ActivityPub
#894
Conversation
This way we could replace the permalink with the ID of a post or an author, to work agains the Username and Permalink issue.
?p=
and ?author=
for ActivityPub?p=<id>
and ?author=<id>
for ActivityPub
@mattwiebe @akirk @jeherve @mediaformat @Menrath Is that the way to go? What do you think about using the |
I think that would be a good idea, if I remember rightly, we discussed this very thing on a call about a year ago! :) Can you link to any discussion about the mentioned "to work agains the Username and Permalink issue". I am not completely sure, if I have the right issue in mind. A suggestion: what about replacing So do you think |
I am not sure if there is a discussion exactly about that, but in the end it is the same discussion that speaks against the permalink. People want to change names and if the pretty URL is also the ID, we always need to send a
The nice thing about using
|
It makes sense to me at first, since it follows the existing "ugly permalinks" defaults from Core itself. I'm not familiar with the issues it solves though, so I'll let others weigh in on that :) |
I haven't thought it through but I just wanted to mention that also the REST API endpoints might be an option, e.g. |
@akirk the problem with the REST endpoint is, that the ID has to return the ActivityPub JSON when requested with the correct Accept header! Besides of that, I would love to redirect the user to the post or author permalink if loaded in the browser and I am not a fan of redirecting API requests to the frontend. |
Makes sense not to use it then! I just wanted to add it as an option so that we know it was considered. |
This is very welcome! Using |
The only downside of this that I can see is that you will no longer to be able to paste the pretty permalink URL into eg a Mastodon search and get the result. But it's overall more robust and does have the possibility of bypassing some caching layers, have there been any tests along those lines? Are we looking to address caching plugins, or Cloudflare, or? |
This will still be possible! I do not want to disable the Content-Negotiation, so people will still be able to search for |
Exactly! If a caching system would not be able to support Content-Negotiation, the user can simply disable the cache for |
This is definitely sounding like a good way to go. What if any are the downsides for existing sites having all of their IDs updated in this way? |
@mattwiebe I thought about storing a date, when the plugin updates to this version, to only change the ID for posts that are newer than that date. does that make sense? |
Interesting point: https://mastodon.social/@by_caballero/113152023836926387
|
What speaks against that is, that Comments ( |
Yup makes sense, probably even easier to just store the highest published post ID at the time of the plugin update? |
posts that where posted after the upgrade
@Menrath I tested profiles and posts with misskey, mastodon, nodebb and friendi.ca and everything worked fine so far! No issues with query params so far! |
@mattwiebe @akirk @jeherve @mediaformat @Menrath I would love to get this merged! Does anyone have any concerns or has anyone had positive/negative effects when testing? |
I didn't test this but I am unsure how this should work. For posts, it makes sense: As I understand the code you want to maintain the old full URL until the last post when migrating and from then on the URL with the post id. But for authors, you're changing the ActivityPub id and maintaining it for old followers. So doest this mean that for Mastodon instances they will appear as two separate authors? |
Oh, I realise because of aliases in Webfinger this should "just work." |
I check if the user has followers, if so I do not change anything, if not it uses the "new" id: https://github.com/Automattic/wordpress-activitypub/pull/894/files#diff-e2183e3284e3a7161c943a36d71aa3b1becf63ffe7ed41afa0b16d4c16944f2eR368 and https://github.com/Automattic/wordpress-activitypub/pull/894/files#diff-1d75cd772f6ce6eec7428f320fbc02e1829fbf3e96194d74c451beb246fc50e7R116 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ready! One way to find out.
This way we could replace the permalink with the ID of a post or an author, to work agains the Username and Permalink issue.
Maybe fixes the caching issues in WordPress!?!