From c577880aace496f1a6381d0bbd7016e4492a6368 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Thu, 30 Jan 2020 08:42:54 -0400 Subject: [PATCH] no auto send --- services/gunDB/contact-api/actions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/gunDB/contact-api/actions.js b/services/gunDB/contact-api/actions.js index 4ecdfe7f..bcf416bc 100644 --- a/services/gunDB/contact-api/actions.js +++ b/services/gunDB/contact-api/actions.js @@ -407,6 +407,10 @@ const sendHandshakeRequest = async (recipientPublicKey, gun, user, SEA) => { throw new TypeError('recipientPublicKey is an string of length 0') } + if (recipientPublicKey === user.is.pub) { + throw new Error('Do not send a request to yourself') + } + console.log('sendHR() -> before recipientEpub') /** @type {string} */