4971 add issyncenabled toggle in messaging settings (#4995)
- Closes #4971 - Fix calendar import to take isSyncEnabled into account
This commit is contained in:
@ -63,7 +63,9 @@ export class GmailFetchMessageContentFromCacheService {
|
||||
return;
|
||||
}
|
||||
|
||||
if (connectedAccount.authFailedAt) {
|
||||
const { accessToken, refreshToken, authFailedAt } = connectedAccount;
|
||||
|
||||
if (authFailedAt) {
|
||||
this.logger.error(
|
||||
`Connected account ${connectedAccountId} in workspace ${workspaceId} is in a failed state. Skipping...`,
|
||||
);
|
||||
@ -71,9 +73,6 @@ export class GmailFetchMessageContentFromCacheService {
|
||||
return;
|
||||
}
|
||||
|
||||
const accessToken = connectedAccount.accessToken;
|
||||
const refreshToken = connectedAccount.refreshToken;
|
||||
|
||||
if (!refreshToken) {
|
||||
throw new Error(
|
||||
`No refresh token found for connected account ${connectedAccountId} in workspace ${workspaceId}`,
|
||||
|
||||
Reference in New Issue
Block a user