Describe the bug
After the changes in #18712, the teams New Channel Message trigger only works on the first message and then fails.
This should be because the listChannelMessages
function currently calls the /teams/${teamId}/channels/${channelId}/messages/delta
route, which orders messages in ascending order (and additionally no deltaToken
is passed in - docs).
I believe the possible fixes are either:
- Change the route to
/teams/${teamId}/channels/${channelId}/messages
(docs) which automatically retrieves messages sorted descending by last modified date
- Use
deltaToken
on the current route appropriately to get new messages
To Reproduce
Steps to reproduce the behavior:
- Create New Channel Message trigger
- Send a message -> should trigger
- Send another message -> fails to trigger