You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, the 'skip' part is ignored. Hence, with this link, again all messages are retrieved. Normally, one has to write a function checking for the nextlink. If the the nextlink returns values, check again for the next nextlink and so on, until the returned value is empty. As in this case, the value never will be empty, the function will never end.
This works with plain api/gc/v1/me/mailFolders/AAAAAG55cVcpA0rYlYKRcCRup8YBAAAAAwAAAMwL-82Ny0ZQud98sYamzIAAAAAA/messages?$top=1000
The culprit seems to lie in backend/kopano/resource.py, in particular in folder_gen, where for queries a yielder() function is provided to replace the actual folder.items generator. count is set 0. But event with a correct count of the generator (i.e. via count = len([item for item in folder.items(quer=query)) the problem remains. I have tried to implement a lambda expression here but was not successful.
This is a pity, as it prevents filtering messages in mailfolders.
The text was updated successfully, but these errors were encountered:
sorry for the long wait. We are currently busy with some other projects and have therefore did not have the time to further look into your changes. The plan is to pick this up again starting in october.
If I retreive messages with a query, i.e.:
api/gc/v1/me/mailFolders/AAAAAG55cVcpA0rYlYKRcCRup8YBAAAAAwAAAMwL-82Ny0ZQud98sYamzIAAAAAA/messages?$top=1000&$search=subject%3DYour
The list of messages is generated. However, the nextlink looks like that:
api/gc/v1/me/mailFolders/AAAAAG55cVcpA0rYlYKRcCRup8YBAAAAAwAAAMwL-82Ny0ZQud98sYamzIAAAAAA/messages?$top=1000&$search=subject%3DYour&$skip=1000
Here, the 'skip' part is ignored. Hence, with this link, again all messages are retrieved. Normally, one has to write a function checking for the nextlink. If the the nextlink returns values, check again for the next nextlink and so on, until the returned value is empty. As in this case, the value never will be empty, the function will never end.
This works with plain api/gc/v1/me/mailFolders/AAAAAG55cVcpA0rYlYKRcCRup8YBAAAAAwAAAMwL-82Ny0ZQud98sYamzIAAAAAA/messages?$top=1000
The culprit seems to lie in backend/kopano/resource.py, in particular in folder_gen, where for queries a yielder() function is provided to replace the actual folder.items generator. count is set 0. But event with a correct count of the generator (i.e. via count = len([item for item in folder.items(quer=query)) the problem remains. I have tried to implement a lambda expression here but was not successful.
This is a pity, as it prevents filtering messages in mailfolders.
The text was updated successfully, but these errors were encountered: