From 32415f21ae6ffc20e364a4623c10a3090587f473 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Wed, 18 Nov 2015 17:19:33 +0100 Subject: [PATCH] added missing event --- lib/boards-api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/boards-api.js b/lib/boards-api.js index de9c2c8..5c90a60 100644 --- a/lib/boards-api.js +++ b/lib/boards-api.js @@ -81,7 +81,7 @@ BoardsAPI.prototype.resolveIPNS = function(n,handler){ var cached = this.users[n] if(cached){ this.ee.emit(n,cached) - console.log(n,'was cached') + console.log(n,'was cached',cached) } else { console.log(n,'not cached') } @@ -99,6 +99,7 @@ BoardsAPI.prototype.resolveIPNS = function(n,handler){ if(this.users[n] != url) this.isUserProfile(url,(isit,err) => { if(isit){ console.log(n,'is a user') + if(this.users[n] === undefined) this.ee.emit('user',n,url) this.users[n] = url this.ee.emit(n,url) this.backupCache()