Changeset 86cfa1a in Klonkt for src/services/ap-following.js
- Timestamp:
- 09/30/2026 07:00:30 AM (3 hours ago)
- Branches:
- main
- Children:
- fd8faf5
- Parents:
- 9eb6e1b
- File:
-
- 1 edited
-
src/services/ap-following.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ap-following.js
r9eb6e1b r86cfa1a 172 172 // authorize_interaction "Follow" flow). Returns display fields + inbox, or null 173 173 // when it isn't a reachable actor (e.g. the input was a post, not a profile). 174 export async function resolveRemoteActor(input) { 174 // 175 // ONDERTEKEND ALLEEN ALS DE AANROEPER DE SITE NOEMT (opts.asSlug). Een instance 176 // met authorized fetch (mastodon.social) geeft een onbetekende GET een 401, en 177 // dan leek een bestaand profiel te ontbreken -- terwijl een ander Mastodon 178 // zonder die instelling het wel toonde. fetchActor probeert eerst onbetekend en 179 // tekent pas als dat niet lukt. 180 // 181 // Tekenen is deze site die voor het verzoek instaat, met haar eigen sleutel. 182 // Dat mag alleen namens een ingelogde beheerder van die site: de zoekbalk 183 // (achter mayLookUp) en /authorize_interaction (requireSiteManager) zijn de 184 // enige die asSlug meegeven. Zonder opts blijft dit onbetekend. 185 export async function resolveRemoteActor(input, opts = {}) { 175 186 const s = String(input || '').trim(); 176 187 const actorUrl = /^https?:\/\//i.test(s) ? (safeUrl(s) || null) : await webfingerResolve(s); 177 188 if (!actorUrl) return null; 178 const actor = await fetchActor(actorUrl ).catch(() => null);189 const actor = await fetchActor(actorUrl, opts.asSlug ? { asSlug: opts.asSlug } : {}).catch(() => null); 179 190 if (!actor || !actor.id || !actor.inbox) return null; 180 191 const ai = actorInfo(actor, actor.id);
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)