Skip to content

Commit

Permalink
fix(slack trigger): properly iterate api response (#1058)
Browse files Browse the repository at this point in the history
The iteration should not assume every page has size of limit set (200)

Signed-off-by: Aleksander Gondek <gondekaleksander@protonmail.com>
  • Loading branch information
AleksanderGondek committed Feb 8, 2021
1 parent e94f547 commit 714b465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sensors/triggers/slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (t *SlackTrigger) Execute(ctx context.Context, events map[string]*v1alpha1.
break
}
}
if len(channels) < params.Limit || nextCursor == "" {
if nextCursor == "" {
break
}
params.Cursor = nextCursor
Expand Down

0 comments on commit 714b465

Please sign in to comment.