feat(threads): ship threads and the Plutonium page to everyone (#3277)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-08 16:30:39 +02:00
1 parent 1515a8487f
commit f8505d19f7
53 files changed
+296 -2008

No files matched your search

@@ -70,7 +70,7 @@ describe('KVThreadAutoArchiveQueueService', () => {
setCassandraQueryExecutorForTesting(new InMemoryCassandraQueryExecutor());
kv = new MockKVProvider();
repositories = new ChannelRepository();
queue = new KVThreadAutoArchiveQueueService(kv, repositories.threads, repositories.channelData);
queue = new KVThreadAutoArchiveQueueService(kv);
base = Date.now() - 10 * HOUR;
await upsertOne(Channels.upsertAll({...threadRow(PARENT_ID), type: ChannelTypes.GUILD_TEXT, parent_id: null}));
});
@@ -134,14 +134,4 @@ describe('KVThreadAutoArchiveQueueService', () => {
await queue.schedule(transition!.state, null);
expect(await kv.zcard(threadArchiveQueueKey(GUILD_ID))).toBe(0);
});
it('rebuilds a guild from its active partition', async () => {
const first = await createThread(0, 60);
const second = await createThread(1000, 60);
await createThread(2000, 60, ChannelFlags.PINNED);
await kv.zadd(threadArchiveQueueKey(GUILD_ID), 1, '123');
expect(await queue.rebuildGuild(GUILD_ID)).toBe(2);
expect(await queue.getDue(GUILD_ID, Date.now(), 200)).toEqual([first.threadId, second.threadId]);
expect(await queue.getDue(GUILD_ID, Date.now(), 1)).toEqual([first.threadId]);
});
});