From 9256439cf9bd93acc585d292ebd0aa511052fd76 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 30 May 2023 10:36:19 +0200 Subject: [PATCH] remove obsolete Buffer.from --- dht-node/src/dht_node/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dht-node/src/dht_node/index.ts b/dht-node/src/dht_node/index.ts index 4e9b83107..adef0fc52 100644 --- a/dht-node/src/dht_node/index.ts +++ b/dht-node/src/dht_node/index.ts @@ -219,7 +219,7 @@ async function writeHomeCommunityEntry(keyPair: KeyPair): Promise { let homeCom = await DbCommunity.findOne({ foreign: false }) if (homeCom) { // simply update the existing entry, but it MUST keep the ID and UUID because of possible relations - homeCom.publicKey = Buffer.from(keyPair.publicKey) + homeCom.publicKey = keyPair.publicKey homeCom.url = CONFIG.FEDERATION_COMMUNITY_URL + '/api/' homeCom.name = CONFIG.COMMUNITY_NAME homeCom.description = CONFIG.COMMUNITY_DESCRIPTION @@ -229,7 +229,7 @@ async function writeHomeCommunityEntry(keyPair: KeyPair): Promise { // insert a new homecommunity entry including a new ID and a new but ensured unique UUID homeCom = new DbCommunity() homeCom.foreign = false - homeCom.publicKey = Buffer.from(keyPair.publicKey) + homeCom.publicKey = keyPair.publicKey homeCom.communityUuid = await newCommunityUuid() homeCom.url = CONFIG.FEDERATION_COMMUNITY_URL + '/api/' homeCom.name = CONFIG.COMMUNITY_NAME