Changeset 98688c6 in Klonkt
- Timestamp:
- 06/26/2026 10:23:33 AM (2 months ago)
- Branches:
- main
- Children:
- 5783c67
- Parents:
- cbe4f4e
- Location:
- src
- Files:
-
- 2 edited
-
services/ActivityPubService.js (modified) (1 diff)
-
views/pages/volgend.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
rcbe4f4e r98688c6 1160 1160 const base = (process.env.PUBLIC_BASE_URL || '').replace(/\/+$/, ''); 1161 1161 if (!base || !site || !site.slug) return { error: 'config' }; 1162 // Accept either an @user@host handle (WebFinger) or a profile/actor URL directly 1163 // (the authorize_interaction Follow flow passes a URL). 1162 // Accept any of: a profile/actor URL, an @user@host handle (WebFinger), or a 1163 // bare site domain (site.com) — for a single-actor site (Klonkt etc.) the root 1164 // resolves to its AP actor, so you can follow a site by just its domain. 1164 1165 const s = String(handle || '').trim(); 1165 const actorUrl = /^https?:\/\//i.test(s) ? (safeUrl(s) || null) : await webfingerResolve(s); 1166 let actorUrl; 1167 if (/^https?:\/\//i.test(s)) actorUrl = safeUrl(s) || null; 1168 else if (s.includes('@')) actorUrl = await webfingerResolve(s); 1169 else if (/^[a-z0-9.-]+\.[a-z]{2,}/i.test(s)) actorUrl = await resolveApActor('https://' + s.replace(/^\/+|\/+$/g, '')); 1170 else actorUrl = null; 1166 1171 if (!actorUrl) return { error: 'not_found' }; 1167 1172 const actor = await fetchActor(actorUrl).catch(() => null); -
src/views/pages/volgend.ejs
rcbe4f4e r98688c6 7 7 8 8 <form method="post" action="/tijdlijn/follow" class="tl-follow"> 9 <input type="text" name="handle" placeholder="@naam@server.social " autocomplete="off" spellcheck="false" required>9 <input type="text" name="handle" placeholder="@naam@server.social of site.com" autocomplete="off" spellcheck="false" required> 10 10 <button type="submit" class="btn btn-primary"><%= t('tl.follow_btn') %></button> 11 11 <label class="tl-follow-ab" title="<%= t('tl.autoboost_hint') %>"><input type="checkbox" name="auto_boost" value="1"> 🔁 <%= t('tl.autoboost_follow') %></label>
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)