mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-10 11:47:42 +02:00
Fix duplicated gmail sync on startup (#9590)
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
@@ -70,8 +70,12 @@ export class WorkspaceClient {
|
||||
async createGmailClient (user: User, authCode?: string): Promise<GmailClient> {
|
||||
const current = user.socialId?._id !== undefined ? this.getGmailClient(user.socialId?._id) : undefined
|
||||
if (current !== undefined) return current
|
||||
this.ctx.info('Creating new gmail client', { workspaceUuid: this.workspace, userId: user.userId })
|
||||
this.ctx.info('Creating new gmail user', { user })
|
||||
this.ctx.info('Creating new gmail client', {
|
||||
workspaceUuid: this.workspace,
|
||||
userId: user.userId,
|
||||
email: user.email,
|
||||
socialId: user.socialId?._id
|
||||
})
|
||||
const newClient = await GmailClient.create(
|
||||
this.ctx,
|
||||
this.credentials,
|
||||
|
||||
Reference in New Issue
Block a user