Microsoft mail sync: make sure that message list fetch is using max batch size (#11095)
Fixes https://github.com/twentyhq/core-team-issues/issues/641
This commit is contained in:
@ -85,7 +85,11 @@ export class MicrosoftGetMessageListService {
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const pageIterator = new PageIterator(microsoftClient, response, callback);
|
const pageIterator = new PageIterator(microsoftClient, response, callback, {
|
||||||
|
headers: {
|
||||||
|
Prefer: `odata.maxpagesize=${MESSAGING_MICROSOFT_USERS_MESSAGES_LIST_MAX_RESULT}, IdType="ImmutableId"`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
await pageIterator.iterate().catch((error) => {
|
await pageIterator.iterate().catch((error) => {
|
||||||
this.microsoftHandleErrorService.handleMicrosoftMessageFetchError(error);
|
this.microsoftHandleErrorService.handleMicrosoftMessageFetchError(error);
|
||||||
@ -203,7 +207,11 @@ export class MicrosoftGetMessageListService {
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const pageIterator = new PageIterator(microsoftClient, response, callback);
|
const pageIterator = new PageIterator(microsoftClient, response, callback, {
|
||||||
|
headers: {
|
||||||
|
Prefer: `odata.maxpagesize=${MESSAGING_MICROSOFT_USERS_MESSAGES_LIST_MAX_RESULT}, IdType="ImmutableId"`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
await pageIterator.iterate().catch((error) => {
|
await pageIterator.iterate().catch((error) => {
|
||||||
this.microsoftHandleErrorService.handleMicrosoftMessageFetchError(error);
|
this.microsoftHandleErrorService.handleMicrosoftMessageFetchError(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user