diff --git a/services/gunDB/sockets/index.js b/services/gunDB/sockets/index.js index f1d24708..18acaf9e 100644 --- a/services/gunDB/sockets/index.js +++ b/services/gunDB/sockets/index.js @@ -238,6 +238,11 @@ const startSocket = socket => { const on = encryptedOn(socket) const { encryptionId } = socket.handshake.auth + if (!isAuthenticated()) { + logger.warn('GunDB is not yet authenticated') + socket.emit(Common.Constants.ErrorCode.NOT_AUTH) + } + on('subscribe:query', ({ $shock, publicKey }, response) => { const subscriptionId = uuidv4() try {