From 093a2d4745f1d091b1abec0a5950c681b7994ab6 Mon Sep 17 00:00:00 2001 From: clauspeterhuebner Date: Tue, 16 Dec 2025 23:28:05 +0100 Subject: [PATCH] set field type on creating new userContact --- core/src/graphql/logic/storeForeignUser.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/graphql/logic/storeForeignUser.ts b/core/src/graphql/logic/storeForeignUser.ts index 1ab8ccca8..9d6542cdb 100644 --- a/core/src/graphql/logic/storeForeignUser.ts +++ b/core/src/graphql/logic/storeForeignUser.ts @@ -6,6 +6,7 @@ import { getLogger } from 'log4js' import { LOG4JS_BASE_CATEGORY_NAME } from '../../config/const' import { SendCoinsResult } from '../../federation/client/1_0/model/SendCoinsResult' import { UserLoggingView, UserContactLoggingView } from 'database' +import { UserContactType } from 'shared' const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.graphql.logic.storeForeignUser`) @@ -78,6 +79,7 @@ export async function storeForeignUser( if(!user.emailContact && committingResult.recipEmail !== null) { logger.debug('creating new userContact:', new UserContactLoggingView(user.emailContact), committingResult) let foreignUserEmail = DbUserContact.create() + foreignUserEmail.type = UserContactType.USER_CONTACT_EMAIL foreignUserEmail.email = committingResult.recipEmail! foreignUserEmail.emailChecked = true foreignUserEmail.user = user