formbricks / formbricks

Open Source Survey Platform
https://formbricks.com
Other
5.9k stars 953 forks source link

fix: Slack integration pagination issue #2733

Closed Dhruwang closed 3 weeks ago

Dhruwang commented 3 weeks ago

What does this PR do?

Fixes an issue with slack integration, where newly created channels were not being displayed in the list of available channels.

It was because, if we do not pass the limit argument, slack API always returns 100 results at max, but in our scenarios, user had more than 100 channels ! Now a limit is set to 200 (recommended by slack) and we additionally use next_cursor .next_cursor is a pagination token returned by the Slack API. It indicates the presence of additional pages of data. When next_cursor is not empty, it should be included in subsequent requests to fetch the next page of data.

Also fixes incorrect Redirect url in docs

How should this be tested?

Test with a large number of channels or, decrease the pagination limit

Checklist

Required

Appreciated

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **formbricks-cloud** | ⬜️ Ignored ([Inspect](https://vercel.com/formbricks/formbricks-cloud/C5BHoik9MRinZY3PbDtPf8i3haXB)) | [Visit Preview](https://formbricks-cloud-git-slack-integration-fix-formbricks.vercel.app) | | Jun 5, 2024 10:28am | | **formbricks-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/formbricks/formbricks-docs/CzfRJ6SKLVrSVU1CsmzwRpkqVVNn)) | [Visit Preview](https://formbricks-docs-git-slack-integration-fix-formbricks.vercel.app) | | Jun 5, 2024 10:28am |
github-actions[bot] commented 3 weeks ago

Thank you for following the naming conventions for pull request titles! 🙏