-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Describe the bug
For Microsoft Teams triggers (sources), every resource is paginated through every time a trigger is run. For the New Chat Message trigger, this causes storage/memory issues for significantly sized chats:

It makes sense to paginate through every resource for some of the triggers which have no intrinsic ordering, like get channels, but for triggers that have an order by created date, like get channel/chat messages, this makes no sense. Only the events since the last checked time need to be fetched from the api, so there's no point in paginating through every possible resource.
To Reproduce
Steps to reproduce the behavior:
- Have a very large Microsoft Teams chat
- Create a Microsoft Teams New Chat Message trigger for that chat
- Send a new message
- See error
Expected behavior
For triggers based on resources with some ordering, only the resources since the last fetch need to be fetched. There's no reason to paginate through every single resource without filtering at all.