Fix self host application (#18292)
- Fixes self host application - add new telemetry information - add serverId to identify a server instance - remove .twenty from git tracking - tree-shake "twenty-sdk" usage in built logic functions and front components - fix "twenty-sdk" version usage - fix twenty-zapier cli --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -44,6 +44,7 @@ import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/works
|
||||
import { WorkspaceEventEmitter } from 'src/engine/workspace-event-emitter/workspace-event-emitter';
|
||||
import { getDomainNameByEmail } from 'src/utils/get-domain-name-by-email';
|
||||
import { isWorkEmail } from 'src/utils/is-work-email';
|
||||
import { TelemetryEventType } from 'src/engine/core-modules/telemetry/telemetry-event.type';
|
||||
|
||||
@Injectable()
|
||||
// eslint-disable-next-line twenty/inject-workspace-repository
|
||||
@@ -357,18 +358,19 @@ export class SignInUpService {
|
||||
? await queryRunner.manager.save(UserEntity, userCreated)
|
||||
: await this.userRepository.save(userCreated);
|
||||
|
||||
const serverUrl = this.twentyConfigService.get('SERVER_URL');
|
||||
|
||||
this.workspaceEventEmitter.emitCustomBatchEvent(
|
||||
this.workspaceEventEmitter.emitCustomBatchEvent<TelemetryEventType>(
|
||||
USER_SIGNUP_EVENT_NAME,
|
||||
[
|
||||
{
|
||||
workspaceId: savedUser.currentWorkspace?.id,
|
||||
userWorkspaceId: savedUser.currentUserWorkspace?.id,
|
||||
userId: savedUser.id,
|
||||
userEmail: newUserWithPicture.email,
|
||||
userFirstName: newUserWithPicture.firstName,
|
||||
userLastName: newUserWithPicture.lastName,
|
||||
locale: newUserWithPicture.locale,
|
||||
serverUrl,
|
||||
serverUrl: this.twentyConfigService.get('SERVER_URL'),
|
||||
serverId: this.twentyConfigService.get('SERVER_ID'),
|
||||
},
|
||||
],
|
||||
undefined,
|
||||
|
||||
Reference in New Issue
Block a user