The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
[messaging] fix add messageParticipant not in a transaction (#3981)
Weiko49cc01d7d8ec
diff --git a/packages/twenty-server/src/core/auth/services/google-gmail.service.ts b/packages/twenty-server/src/core/auth/services/google-gmail.service.tsindex 9ddd138beb5..25e33c208e7 100644--- a/packages/twenty-server/src/core/auth/services/google-gmail.service.ts+++ b/packages/twenty-server/src/core/auth/services/google-gmail.service.ts@@ -67,8 +67,8 @@ export class GoogleGmailService {);await manager.query(- `INSERT INTO ${dataSourceMetadata.schema}."messageChannel" ("visibility", "handle", "connectedAccountId", "type", "isContactAutoCreationEnabled") VALUES ($1, $2, $3, $4, $5)`,- ['share_everything', handle, connectedAccountId, 'email', true],+ `INSERT INTO ${dataSourceMetadata.schema}."messageChannel" ("visibility", "handle", "connectedAccountId", "type") VALUES ($1, $2, $3, $4)`,+ ['share_everything', handle, connectedAccountId, 'email'],);});diff --git a/packages/twenty-server/src/workspace/messaging/repositories/message/message.service.ts b/packages/twenty-server/src/workspace/messaging/repositories/message/message.service.tsindex 08a59632b24..dc88ad75c27 100644--- a/packages/twenty-server/src/workspace/messaging/repositories/message/message.service.ts+++ b/packages/twenty-server/src/workspace/messaging/repositories/message/message.service.ts@@ -215,6 +215,7 @@ export class MessageService {message.participants,newMessageId,workspaceId,+ manager,);return Promise.resolve(newMessageId);