@rmdes/indiekit-endpoint-activitypub 3.13.0 → 3.13.2
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.
|
@@ -453,7 +453,9 @@ router.put("/api/v1/statuses/:id", tokenRequired, scopeRequired("write", "write:
|
|
|
453
453
|
: new URL(application.micropubEndpoint, application.url).href;
|
|
454
454
|
|
|
455
455
|
const token =
|
|
456
|
-
req.session?.access_token ||
|
|
456
|
+
req.session?.access_token ||
|
|
457
|
+
req.mastodonToken?.indieauthToken ||
|
|
458
|
+
req.mastodonToken?.accessToken;
|
|
457
459
|
if (token) {
|
|
458
460
|
const updatePayload = {
|
|
459
461
|
action: "update",
|
|
@@ -513,13 +515,16 @@ router.put("/api/v1/statuses/:id", tokenRequired, scopeRequired("write", "write:
|
|
|
513
515
|
const updated = await collections.ap_timeline.findOne({
|
|
514
516
|
_id: item._id,
|
|
515
517
|
});
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
);
|
|
519
|
-
const handle = pluginOptions.actor?.handle || "";
|
|
520
|
-
setLocalIdentity(localPublicationUrl, handle);
|
|
518
|
+
const interactionState = await loadItemInteractions(collections, updated);
|
|
519
|
+
const { replyIdMap, replyAccountIdMap } = await resolveReplyIds(collections.ap_timeline, [updated]);
|
|
521
520
|
|
|
522
|
-
const serialized = serializeStatus(updated, {
|
|
521
|
+
const serialized = serializeStatus(updated, {
|
|
522
|
+
baseUrl,
|
|
523
|
+
...interactionState,
|
|
524
|
+
pinnedIds: new Set(),
|
|
525
|
+
replyIdMap,
|
|
526
|
+
replyAccountIdMap,
|
|
527
|
+
});
|
|
523
528
|
res.json(serialized);
|
|
524
529
|
} catch (error) {
|
|
525
530
|
next(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-activitypub",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.2",
|
|
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",
|
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
{{ notificationBanner({ type: "success", text: "Settings saved." }) }}
|
|
12
12
|
{% endif %}
|
|
13
13
|
|
|
14
|
-
{{ heading({ text: title }) }}
|
|
15
|
-
|
|
16
14
|
<form method="POST" action="{{ mountPath }}/admin/settings">
|
|
17
15
|
<input type="hidden" name="_csrf" value="{{ csrfToken }}">
|
|
18
16
|
|
|
@@ -47,13 +45,16 @@
|
|
|
47
45
|
|
|
48
46
|
{{ radios({
|
|
49
47
|
name: "defaultVisibility",
|
|
50
|
-
|
|
48
|
+
fieldset: {
|
|
49
|
+
legend: "Default post visibility"
|
|
50
|
+
},
|
|
51
51
|
hint: "Default visibility for new posts. Default: " + defaults.defaultVisibility,
|
|
52
52
|
items: [
|
|
53
|
-
{ value: "public",
|
|
54
|
-
{ value: "unlisted",
|
|
55
|
-
{ value: "private",
|
|
56
|
-
]
|
|
53
|
+
{ value: "public", label: "Public" },
|
|
54
|
+
{ value: "unlisted", label: "Unlisted" },
|
|
55
|
+
{ value: "private", label: "Followers only" }
|
|
56
|
+
],
|
|
57
|
+
values: [settings.defaultVisibility]
|
|
57
58
|
}) }}
|
|
58
59
|
|
|
59
60
|
{{ input({
|
|
@@ -128,14 +129,17 @@
|
|
|
128
129
|
|
|
129
130
|
{{ radios({
|
|
130
131
|
name: "logLevel",
|
|
131
|
-
|
|
132
|
+
fieldset: {
|
|
133
|
+
legend: "Federation log level"
|
|
134
|
+
},
|
|
132
135
|
hint: "Fedify log verbosity. Default: " + defaults.logLevel,
|
|
133
136
|
items: [
|
|
134
|
-
{ value: "debug",
|
|
135
|
-
{ value: "info",
|
|
136
|
-
{ value: "warning",
|
|
137
|
-
{ value: "error",
|
|
138
|
-
]
|
|
137
|
+
{ value: "debug", label: "Debug" },
|
|
138
|
+
{ value: "info", label: "Info" },
|
|
139
|
+
{ value: "warning", label: "Warning" },
|
|
140
|
+
{ value: "error", label: "Error" }
|
|
141
|
+
],
|
|
142
|
+
values: [settings.logLevel]
|
|
139
143
|
}) }}
|
|
140
144
|
</fieldset>
|
|
141
145
|
|