From e4f8cd0f35a70f99ac9238099ac65d8bad107daf Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 30 May 2023 10:35:08 +0200 Subject: [PATCH] save privatekey for home community --- dht-node/src/dht_node/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dht-node/src/dht_node/index.ts b/dht-node/src/dht_node/index.ts index adef0fc52..639909735 100644 --- a/dht-node/src/dht_node/index.ts +++ b/dht-node/src/dht_node/index.ts @@ -220,6 +220,7 @@ async function writeHomeCommunityEntry(keyPair: KeyPair): Promise { if (homeCom) { // simply update the existing entry, but it MUST keep the ID and UUID because of possible relations homeCom.publicKey = keyPair.publicKey + homeCom.privateKey = keyPair.secretKey homeCom.url = CONFIG.FEDERATION_COMMUNITY_URL + '/api/' homeCom.name = CONFIG.COMMUNITY_NAME homeCom.description = CONFIG.COMMUNITY_DESCRIPTION @@ -230,6 +231,7 @@ async function writeHomeCommunityEntry(keyPair: KeyPair): Promise { homeCom = new DbCommunity() homeCom.foreign = false homeCom.publicKey = keyPair.publicKey + homeCom.privateKey = keyPair.secretKey homeCom.communityUuid = await newCommunityUuid() homeCom.url = CONFIG.FEDERATION_COMMUNITY_URL + '/api/' homeCom.name = CONFIG.COMMUNITY_NAME