unoffical wafrn mirror wafrn.net
atproto social-network activitypub
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Sync bluesky follows

+20
+20
packages/backend/utils/maintenanceTasks/syncAllBskyFollows.ts
··· 1 + import { Op } from 'sequelize' 2 + import { User } from '../../models/index.js' 3 + import { syncBskyFollowersAndFollowing } from '../atproto/syncBskyFollowersAndFollowing.js' 4 + import { wait } from '../wait.js' 5 + 6 + console.log(`---Initiating full sync of follows with bluesky---`) 7 + const users = await User.findAll({ 8 + where: { 9 + email: { 10 + [Op.ne]: null 11 + }, 12 + enableBsky: true 13 + } 14 + }) 15 + 16 + for await (const user of users) { 17 + console.log(`Syncing ${user.url}`) 18 + await syncBskyFollowersAndFollowing(user.id) 19 + // await wait(500) 20 + }