Skip to content

Commit 85f7de7

Browse files
committed
fix: adjust default channel limit to 100 for consistency in Slack API calls
1 parent 3f5072d commit 85f7de7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

slack/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export class SlackClient {
289289
*/
290290
async getChannels(
291291
teamId: string,
292-
limit: number = 1000,
292+
limit: number = 100,
293293
cursor?: string,
294294
types: ChannelType[] = ["public_channel", "private_channel"],
295295
): Promise<SlackResponse<{

slack/loaders/channels.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default async function listChannels(
2828
_req: Request,
2929
ctx: AppContext,
3030
): Promise<SlackResponse<{ channels: SlackChannel[] }>> {
31-
const { limit, cursor, types } = props;
31+
const { limit = 100, cursor, types } = props;
3232
const teamId = ctx.teamId;
3333

3434
if (!teamId) {
@@ -45,7 +45,7 @@ export default async function listChannels(
4545
try {
4646
const response = await ctx.slack.getChannels(
4747
teamId,
48-
1000, // Use max limit for pagination
48+
limit,
4949
nextCursor,
5050
types,
5151
);

0 commit comments

Comments
 (0)