Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
23 lines
678 B
TypeScript
23 lines
678 B
TypeScript
import { runScript } from './run-script'
|
|
import { addUsersToPrivateMessageChannel } from 'shared/supabase/private-messages'
|
|
|
|
if (require.main === module) {
|
|
runScript(async ({ pg }) => {
|
|
const loverIds = await pg.many(`select user_id from lovers`)
|
|
const channelIds = await pg.many(
|
|
`select id from private_user_message_channels where title is not null`
|
|
)
|
|
console.log(`Adding ${loverIds.length} users to channels:`, channelIds)
|
|
await Promise.all(
|
|
channelIds.map(
|
|
async ({ id }) =>
|
|
await addUsersToPrivateMessageChannel(
|
|
loverIds.map((u) => u.user_id),
|
|
id,
|
|
pg
|
|
)
|
|
)
|
|
)
|
|
})
|
|
}
|