Skip to content

Commit e4d2c70

Browse files
committed
fix channel data fetching
1 parent 2616155 commit e4d2c70

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

integration-tests/utils/fetch-slack-data.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require('dotenv').config();
1616
const WebClient = slackWebApi.WebClient;
1717

1818
const DEFAULT_OUTPUT_DIR = path.join(__dirname, '../mocks/slack-api/data');
19-
const DEFAULT_CHANNEL_LIMIT = 10;
19+
const DEFAULT_CHANNEL_LIMIT = 5;
2020
const DEFAULT_MESSAGE_LIMIT = 20;
2121
const DEFAULT_USER_LIMIT = 20;
2222

@@ -202,8 +202,9 @@ async function fetchChannels() {
202202
try {
203203
log.info('Fetching channel list...');
204204
const result = await slack.conversations.list({
205-
limit: channelLimit,
206-
types: 'public_channel,private_channel'
205+
limit: 100,
206+
types: 'public_channel,private_channel',
207+
exclude_archived: true
207208
});
208209
saveToFile(result, 'conversations.json');
209210
return result.channels;
@@ -274,7 +275,6 @@ async function main() {
274275
const activeChannels = channels.filter(channel => !channel.is_archived);
275276
log.info(`Found ${activeChannels.length} active channels out of ${channels.length} total`);
276277

277-
const channelLimit = 5;
278278
const targetChannels = activeChannels.slice(0, channelLimit);
279279
log.info(`Selected ${targetChannels.length} active channels for message fetching`);
280280

0 commit comments

Comments
 (0)