@rmdes/indiekit-endpoint-activitypub 2.4.3 → 2.4.4
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.
|
@@ -282,7 +282,9 @@ document.addEventListener("alpine:init", () => {
|
|
|
282
282
|
const card = entry.target;
|
|
283
283
|
const uid = card.dataset.uid;
|
|
284
284
|
if (uid && !card.classList.contains("ap-card--read")) {
|
|
285
|
-
|
|
285
|
+
// Mark read server-side but DON'T dim visually in this session.
|
|
286
|
+
// Cards only appear dimmed when they arrive from the server
|
|
287
|
+
// with item.read=true on a subsequent page load.
|
|
286
288
|
this._batch.push(uid);
|
|
287
289
|
}
|
|
288
290
|
this._observer.unobserve(card);
|
|
@@ -116,14 +116,17 @@ export function mapMastodonStatusToItem(status, instance) {
|
|
|
116
116
|
video,
|
|
117
117
|
audio,
|
|
118
118
|
inReplyTo: status.in_reply_to_id ? `https://${instance}/web/statuses/${status.in_reply_to_id}` : "",
|
|
119
|
-
quoteUrl: status.quote?.url || status.quote?.uri || "",
|
|
120
119
|
createdAt: new Date().toISOString(),
|
|
121
120
|
_explore: true,
|
|
122
121
|
};
|
|
123
122
|
|
|
124
123
|
// Map quoted post data if present (Mastodon 4.3+ quote support)
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
// Mastodon API wraps the quoted status: { state: "accepted", quoted_status: { ...fullStatus } }
|
|
125
|
+
const quotedStatus = status.quote?.quoted_status || null;
|
|
126
|
+
if (quotedStatus) {
|
|
127
|
+
item.quoteUrl = quotedStatus.url || quotedStatus.uri || "";
|
|
128
|
+
|
|
129
|
+
const q = quotedStatus;
|
|
127
130
|
const qAccount = q.account || {};
|
|
128
131
|
const qAcct = qAccount.acct || "";
|
|
129
132
|
const qHandle = qAcct.includes("@") ? `@${qAcct}` : `@${qAcct}@${instance}`;
|
|
@@ -152,6 +155,8 @@ export function mapMastodonStatusToItem(status, instance) {
|
|
|
152
155
|
name: "",
|
|
153
156
|
photo: qPhoto.slice(0, 1),
|
|
154
157
|
};
|
|
158
|
+
} else {
|
|
159
|
+
item.quoteUrl = "";
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
return item;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-activitypub",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
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",
|