[messaging] reorder messages desc to asc (#3755)

This commit is contained in:
Weiko 2024-02-01 15:28:00 +01:00 committed by GitHub
parent 68e65e9526
commit 142affbeea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 15 deletions

View File

@ -38,7 +38,7 @@ export const RightDrawerEmailThread = () => {
},
objectNameSingular: CoreObjectNameSingular.Message,
orderBy: {
receivedAt: 'DescNullsLast',
receivedAt: 'AscNullsLast',
},
skip: !viewableEmailThread,
useRecordsWithoutConnection: true,

View File

@ -82,8 +82,6 @@ export class FetchMessagesByBatchesService {
},
);
console.log('responseFromGmailQuery', response);
return response;
}

View File

@ -67,8 +67,6 @@ export class GmailFullSyncService {
pageToken: nextPageToken,
});
console.log('messageList query result from gmail', messages);
const messagesData = messages.data.messages;
const messageExternalIds = messagesData
@ -86,11 +84,6 @@ export class GmailFullSyncService {
workspaceId,
);
console.log(
'existingMessagesInDB',
existingMessageChannelMessageAssociations,
);
const existingMessageChannelMessageAssociationsExternalIds =
existingMessageChannelMessageAssociations.map(
(messageChannelMessageAssociation) =>
@ -104,8 +97,6 @@ export class GmailFullSyncService {
),
);
console.log('newMessagesToFetch', messagesToFetch);
const messageQueries =
this.utils.createQueriesFromMessageIds(messagesToFetch);
@ -115,8 +106,6 @@ export class GmailFullSyncService {
accessToken,
);
console.log('messagesToSave', messagesToSave);
if (messagesToSave.length === 0) {
return;
}
@ -149,7 +138,7 @@ export class GmailFullSyncService {
console.log(
`gmail full-sync for workspace ${workspaceId} and account ${connectedAccountId} ${
nextPageToken ? `and ${nextPageToken} pageToken` : ''
} done.`,
}done.`,
);
if (messages.data.nextPageToken) {