Item list pagination: url returned by the webex teams api is not complete
The sdk automatically handles the pagination for us by reusing the link: ; rel="next" header. However the returned one can be incorrect when some parameters are specifed
The object listing can be broken or worse, can succeed while ignoring the filtering parameters for pages above the first one.
Example: a bot needs to specify mentionedPeople=me to be allowed to list room messages. If there are several pages to be returned, then the listing will fail because the mentionedPeople query parameter won't be specified when fetching the next pages
To reproduce: create a room add a bot, post more than 10 messages for the specified bot. Attempt to list messages through the webexteamssdk using the bot token
This will result in a 403 message -> can directly be manually reproduced by checking the link header in the api response (because of the missing mentionedPeople param)
The bug is actually an api bug more than an sdk one. Yet we can give a fix proposal on sdk side by reusing and amending the def _fix_next_url method in restsession.py
Tests not ran nor checked
Can we get this merged please? This is pretty significant issue for bot use cases - the fix works for me, FWIW.
This is a good idea - even as we are very late picking it up. Let me see if I can get it in the v1.7 release.
Already merged.