@rmdes/indiekit-endpoint-activitypub 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/jf2-to-as2.js +11 -0
- package/package.json +1 -1
package/lib/jf2-to-as2.js
CHANGED
|
@@ -82,6 +82,11 @@ export function jf2ToActivityStreams(properties, actorUrl, publicationUrl) {
|
|
|
82
82
|
object.content = properties.content?.html || properties.content || "";
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
// Append permalink to content so fediverse clients show a clickable link
|
|
86
|
+
if (postUrl && object.content) {
|
|
87
|
+
object.content += `<p>\u{1F517} <a href="${postUrl}">${postUrl}</a></p>`;
|
|
88
|
+
}
|
|
89
|
+
|
|
85
90
|
if (isArticle) {
|
|
86
91
|
object.name = properties.name;
|
|
87
92
|
if (properties.summary) {
|
|
@@ -180,6 +185,12 @@ export function jf2ToAS2Activity(properties, actorUrl, publicationUrl) {
|
|
|
180
185
|
noteOptions.content = properties.content?.html || properties.content || "";
|
|
181
186
|
}
|
|
182
187
|
|
|
188
|
+
// Append permalink to content so fediverse clients show a clickable link
|
|
189
|
+
// back to the canonical post on the author's site
|
|
190
|
+
if (postUrl && noteOptions.content) {
|
|
191
|
+
noteOptions.content += `<p>\u{1F517} <a href="${postUrl}">${postUrl}</a></p>`;
|
|
192
|
+
}
|
|
193
|
+
|
|
183
194
|
if (isArticle) {
|
|
184
195
|
noteOptions.name = properties.name;
|
|
185
196
|
if (properties.summary) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-activitypub",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indiekit",
|