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()