Changeset 3d7312a in Klonkt for src/services
- Timestamp:
- 06/24/2026 12:44:21 PM (3 months ago)
- Branches:
- main
- Children:
- 594cc50
- Parents:
- 82079ad
- Location:
- src/services
- Files:
-
- 2 edited
-
ActivityPubService.js (modified) (1 diff)
-
i18n.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r82079ad r3d7312a 477 477 } 478 478 479 // Resolve a remote post URL (any fediverse/Klonkt post) into a reply target. 480 // Returns a parent-shaped object usable by deliverReply(), or null. 481 export async function resolveRemoteNote(url) { 482 if (!/^https?:\/\//i.test(String(url || ''))) return null; 483 const note = await fetchActor(url).catch(() => null); // AP GET (content-negotiates) 484 if (!note || !note.id) return null; 485 const att = note.attributedTo; 486 const actorUri = typeof att === 'string' ? att : (att && att.id); 487 if (!actorUri) return null; 488 const actor = await fetchActor(actorUri).catch(() => null); 489 const ai = actorInfo(actor, actorUri); 490 return { 491 object_uri: note.id, 492 actor_uri: actorUri, 493 actor_url: ai.url, 494 actor_handle: ai.handle, 495 actor_name: ai.name, 496 actor_icon: ai.icon, 497 preview: HtmlSanitizerService.toPlainText(note.content || '').slice(0, 240), 498 }; 499 } 500 479 501 export default { 480 502 getOrCreateKeys, apWants, sendAP, actorId, noteId, 481 503 buildActor, buildNote, buildCreate, buildOutbox, buildFollowers, 482 504 followerCount, deliver, fetchActor, verifyRequest, handleInbox, deliverCreate, deliverDelete, 483 getInteractions, getInteractionById, buildReplyNote, getOutboxNote, deliverReply, 505 getInteractions, getInteractionById, buildReplyNote, getOutboxNote, deliverReply, resolveRemoteNote, 484 506 }; -
src/services/i18n.js
r82079ad r3d7312a 109 109 'fedi.heading': 'Vanuit de fediverse', 'fedi.likes': 'sterren', 'fedi.boosts': 'boosts', 'fedi.replies': 'Reacties uit de fediverse', 110 110 'fedi.reply': 'Reageer', 'fedi.reply_ph': 'Je antwoord aan de fediverse…', 'fedi.send': 'Versturen', 'fedi.you': 'Jij', 111 'fedi.remote_title': 'Reageer via de fediverse', 'fedi.remote_reply': 'Reageer via de fediverse', 'fedi.remote_prompt': 'Je fediverse-adres (bv. @jij@mastodon.social):', 'fedi.remote_notfound': 'Kon die post niet ophalen. Plak de volledige post-URL:', 'fedi.remote_load': 'Ophalen', 'fedi.remote_replying_to': 'Je reageert op', 'fedi.remote_as': 'Wordt verzonden als {site}.', 111 112 'comments.to_start': 'om de conversatie te starten.', 112 113 'comments.reply': 'Reageer', 'comments.delete': 'Verwijder', 'comments.cancel': 'Annuleren', … … 1103 1104 'fedi.heading': 'From the fediverse', 'fedi.likes': 'favourites', 'fedi.boosts': 'boosts', 'fedi.replies': 'Replies from the fediverse', 1104 1105 'fedi.reply': 'Reply', 'fedi.reply_ph': 'Your reply to the fediverse…', 'fedi.send': 'Send', 'fedi.you': 'You', 1106 'fedi.remote_title': 'Reply via the fediverse', 'fedi.remote_reply': 'Reply via the fediverse', 'fedi.remote_prompt': 'Your fediverse address (e.g. @you@mastodon.social):', 'fedi.remote_notfound': 'Could not fetch that post. Paste the full post URL:', 'fedi.remote_load': 'Fetch', 'fedi.remote_replying_to': 'Replying to', 'fedi.remote_as': 'Sent as {site}.', 1105 1107 'comments.to_start': 'to start the conversation.', 1106 1108 'comments.reply': 'Reply', 'comments.delete': 'Delete', 'comments.cancel': 'Cancel', … … 2095 2097 'fedi.heading': 'Aus dem Fediverse', 'fedi.likes': 'Favoriten', 'fedi.boosts': 'Boosts', 'fedi.replies': 'Antworten aus dem Fediverse', 2096 2098 'fedi.reply': 'Antworten', 'fedi.reply_ph': 'Deine Antwort an das Fediverse…', 'fedi.send': 'Senden', 'fedi.you': 'Du', 2099 'fedi.remote_title': 'Über das Fediverse antworten', 'fedi.remote_reply': 'Über das Fediverse antworten', 'fedi.remote_prompt': 'Deine Fediverse-Adresse (z.B. @du@mastodon.social):', 'fedi.remote_notfound': 'Beitrag konnte nicht geladen werden. Füge die vollständige Beitrags-URL ein:', 'fedi.remote_load': 'Laden', 'fedi.remote_replying_to': 'Antwort an', 'fedi.remote_as': 'Wird als {site} gesendet.', 2097 2100 'comments.to_start': 'um das Gespräch zu starten.', 2098 2101 'comments.reply': 'Antworten', 'comments.delete': 'Löschen', 'comments.cancel': 'Abbrechen',
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)