predikt/oracle/backend/scripts/add-lovers-to-general.ts
caelum0x 2b68bde5d5 Predikt: full Polymarket-style prediction market — web + mobile + on-chain + bots
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>
2026-07-06 23:29:50 +03:00

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
)
)
)
})
}