[messaging] rename syncExternalId to syncCursor (#4752)
## Context SyncExternalId should be renamed because this won't always represent an id. For example, microsoft API does not use ids but dates for their sync. Also we think external is a bit redundant so we are removing it. Note: this field is not used by the front-end (and will probably never be)
This commit is contained in:
@ -223,7 +223,7 @@ export class GmailFullSyncV2Service {
|
||||
`Fetched all ${messageIdsToFetch} message ids from Gmail for messageChannel ${messageChannelId} in workspace ${workspaceId} and added to cache for import`,
|
||||
);
|
||||
|
||||
await this.updateLastSyncExternalId(
|
||||
await this.updateLastSyncCursor(
|
||||
gmailClient,
|
||||
messageChannelId,
|
||||
firstMessageExternalId,
|
||||
@ -256,7 +256,7 @@ export class GmailFullSyncV2Service {
|
||||
return blocklist.map((blocklist) => blocklist.handle);
|
||||
}
|
||||
|
||||
private async updateLastSyncExternalId(
|
||||
private async updateLastSyncCursor(
|
||||
gmailClient: gmail_v1.Gmail,
|
||||
messageChannelId: string,
|
||||
firstMessageExternalId: string,
|
||||
@ -292,7 +292,7 @@ export class GmailFullSyncV2Service {
|
||||
`Updating last external id: ${historyId} for workspace ${workspaceId} and account ${messageChannelId} succeeded.`,
|
||||
);
|
||||
|
||||
await this.messageChannelRepository.updateLastSyncExternalIdIfHigher(
|
||||
await this.messageChannelRepository.updateLastSyncCursorIfHigher(
|
||||
messageChannelId,
|
||||
historyId,
|
||||
workspaceId,
|
||||
|
||||
Reference in New Issue
Block a user