File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ require('dotenv').config();
16
16
const WebClient = slackWebApi . WebClient ;
17
17
18
18
const DEFAULT_OUTPUT_DIR = path . join ( __dirname , '../mocks/slack-api/data' ) ;
19
- const DEFAULT_CHANNEL_LIMIT = 10 ;
19
+ const DEFAULT_CHANNEL_LIMIT = 5 ;
20
20
const DEFAULT_MESSAGE_LIMIT = 20 ;
21
21
const DEFAULT_USER_LIMIT = 20 ;
22
22
@@ -202,8 +202,9 @@ async function fetchChannels() {
202
202
try {
203
203
log . info ( 'Fetching channel list...' ) ;
204
204
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
207
208
} ) ;
208
209
saveToFile ( result , 'conversations.json' ) ;
209
210
return result . channels ;
@@ -274,7 +275,6 @@ async function main() {
274
275
const activeChannels = channels . filter ( channel => ! channel . is_archived ) ;
275
276
log . info ( `Found ${ activeChannels . length } active channels out of ${ channels . length } total` ) ;
276
277
277
- const channelLimit = 5 ;
278
278
const targetChannels = activeChannels . slice ( 0 , channelLimit ) ;
279
279
log . info ( `Selected ${ targetChannels . length } active channels for message fetching` ) ;
280
280
You can’t perform that action at this time.
0 commit comments