diff --git a/backend/src/activitypub/activities/handle.ts b/backend/src/activitypub/activities/handle.ts index d15419f..6bbdc6c 100644 --- a/backend/src/activitypub/activities/handle.ts +++ b/backend/src/activitypub/activities/handle.ts @@ -389,13 +389,14 @@ export async function handle( // move followers { const collection = await getMetadata(fromActor.followers) - collection.items = await loadItems(collection) + collection.items = await loadItems(collection) // TODO: eventually move to queue and move workers while (collection.items.length > 0) { const batch = collection.items.splice(0, 20) await Promise.all( batch.map(async (items) => { + console.log({ items }) await moveFollowers(db, localActor, items) console.log(`moved ${items.length} followers`) }) @@ -406,7 +407,7 @@ export async function handle( // move following { const collection = await getMetadata(fromActor.following) - collection.items = await loadItems(collection) + collection.items = await loadItems(collection) // TODO: eventually move to queue and move workers while (collection.items.length > 0) { diff --git a/backend/src/mastodon/follow.ts b/backend/src/mastodon/follow.ts index 16ef42e..8a54b8c 100644 --- a/backend/src/mastodon/follow.ts +++ b/backend/src/mastodon/follow.ts @@ -19,6 +19,7 @@ export async function moveFollowers(db: D1Database, actor: Actor, followers: Arr const actorAcc = urlToHandle(actor.id) for (let i = 0; i < followers.length; i++) { + console.log(followers[i]) const follower = new URL(followers[i]) const followActor = await actors.getAndCache(follower, db)