diff --git a/.vscode/settings.json b/.vscode/settings.json index 895f596f..2faaa640 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "cSpell.words": [ + "Epub", "ISEA", "Reqs" ] diff --git a/services/gunDB/rpc/index.js b/services/gunDB/rpc/index.js index 3feecde2..114836d2 100644 --- a/services/gunDB/rpc/index.js +++ b/services/gunDB/rpc/index.js @@ -46,7 +46,7 @@ const deepDecryptIfNeeded = async (value, publicKey) => { } let sec = '' - if (user.is.pub === publicKey) { + if (user.is.pub === publicKey || 'me' === publicKey) { sec = getMySecret() } else { sec = await SEA.secret(await pubToEpub(publicKey), user._.sea) diff --git a/services/gunDB/sockets/index.js b/services/gunDB/sockets/index.js index 18acaf9e..bdab8b56 100644 --- a/services/gunDB/sockets/index.js +++ b/services/gunDB/sockets/index.js @@ -141,7 +141,7 @@ const queryListenerCallback = ({ }) } const eventName = `query:data` - if (publicKeyForDecryption?.length > 15) { + if (publicKeyForDecryption) { const decData = await deepDecryptIfNeeded(data, publicKeyForDecryption) emit(eventName, { subscriptionId, response: { data: decData, key } }) return