mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-23 22:12:24 +03:00
[messaging] reorder messages desc to asc (#3755)
This commit is contained in:
parent
68e65e9526
commit
142affbeea
@ -38,7 +38,7 @@ export const RightDrawerEmailThread = () => {
|
||||
},
|
||||
objectNameSingular: CoreObjectNameSingular.Message,
|
||||
orderBy: {
|
||||
receivedAt: 'DescNullsLast',
|
||||
receivedAt: 'AscNullsLast',
|
||||
},
|
||||
skip: !viewableEmailThread,
|
||||
useRecordsWithoutConnection: true,
|
||||
|
@ -82,8 +82,6 @@ export class FetchMessagesByBatchesService {
|
||||
},
|
||||
);
|
||||
|
||||
console.log('responseFromGmailQuery', response);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user