You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally Mastodon would support Update activities, but there is another solution: federation permalink can be ID-based instead of title-based, and a "pretty url" can be formed from a custom slug containing the title or whatever the user enters.
So, for example, I might post an article on Plume that federates out as https://plume.example/~/trwnh/6743826481264 and the title is test post. The default pretty-url slug would be test-post (but I could edit it manually to test if I wanted to, or 2018/10/11/1, or 2018/testpost, or whatever I wanted) and then the URL would become https://plume.example/~/trwnh/test-post (or whatever i set it to)
When federating that out, you would use the id as that permalink, and url as the slugified link. So for example:
And the content of the Create activity would include the id instead of the url. So something like <p>$title - $id</p> at the simplest, and then it would show up in Mastodon like this:
trwnh (@trwnh@plume.example) posted 23s ago:
-----------------------------------------------------------------
test post - https://plume.example/~/trwnh/6743826481264
-----------------------------------------------------------------
[reply] [boost] [favorite] [menu]
or trwnh posted a new article:<br>$title<br>$id, and then it would show up in Mastodon like this:
trwnh (@trwnh@plume.example) posted 23s ago:
-------------------------------------------------------
trwnh posted a new article:
test post
https://plume.example/~/trwnh/6743826481264
-------------------------------------------------------
[reply] [boost] [favorite] [menu]
The important thing is that the URL that gets federated out cannot change, so it's a bad idea to use a value that can be changed. Not every implementation might support Update activities, so using the id is more robust and will fail in less cases.
Ideally Mastodon would support Update activities, but there is another solution: federation permalink can be ID-based instead of title-based, and a "pretty url" can be formed from a custom slug containing the title or whatever the user enters.
So, for example, I might post an article on Plume that federates out as
https://plume.example/~/trwnh/6743826481264
and the title istest post
. The default pretty-url slug would betest-post
(but I could edit it manually totest
if I wanted to, or2018/10/11/1
, or2018/testpost
, or whatever I wanted) and then the URL would becomehttps://plume.example/~/trwnh/test-post
(or whatever i set it to)When federating that out, you would use the
id
as that permalink, andurl
as the slugified link. So for example:And the
content
of theCreate
activity would include theid
instead of theurl
. So something like<p>$title - $id</p>
at the simplest, and then it would show up in Mastodon like this:or
trwnh posted a new article:<br>$title<br>$id
, and then it would show up in Mastodon like this:The important thing is that the URL that gets federated out cannot change, so it's a bad idea to use a value that can be changed. Not every implementation might support
Update
activities, so using theid
is more robust and will fail in less cases.Related: #221 #207
The text was updated successfully, but these errors were encountered: