Changeset 814ad8b in Klonkt for src/services/CircleService.js


Ignore:
Timestamp:
06/22/2026 03:38:58 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
1ce1ffe
Parents:
b20460e
Message:

feat(circles): site name automatically from the remote actor (no manual input)

syncOne sets circle_links.label = actor.name (every sync, COALESCE fallback).
The manual name field in Admin -> Circles is gone; only the URL is needed.

Co-Authored-By: Claude <noreply@…>
EOF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/services/CircleService.js

    rb20460e r814ad8b  
    194194  }
    195195
     196  // Naam automatisch overnemen van de remote actor (geen handmatige invoer nodig).
     197  // COALESCE: heeft de actor geen naam, dan blijft een evt. bestaand label staan.
    196198  db.prepare(
    197     "UPDATE circle_links SET remote_actor_id=?, last_synced=CURRENT_TIMESTAMP, status='active', last_error=NULL WHERE id=?"
    198   ).run(actorId, link.id);
     199    "UPDATE circle_links SET remote_actor_id=?, label=COALESCE(?, label), last_synced=CURRENT_TIMESTAMP, status='active', last_error=NULL WHERE id=?"
     200  ).run(actorId, actor.name || null, link.id);
    199201
    200202  return { ok: true, actorId, items: seen.size, pruned: stale.length };
Note: See TracChangeset for help on using the changeset viewer.