diff options
author | Ev Bogue <ev@evbogue.com> | 2019-05-22 13:35:17 -0500 |
---|---|---|
committer | Ev Bogue <ev@evbogue.com> | 2019-05-22 13:35:17 -0500 |
commit | 28e2fc486558f45b6b62ba1216e69314ec2bb07e (patch) | |
tree | cf9a0b5a29efa8694b280d6f10a349c0a9eb516e | |
parent | 397482994f74fed3fc0929d369bd87d3ee89ad2b (diff) |
render latest name instead of the first name you used to identify
-rw-r--r-- | bog.js | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -60,11 +60,12 @@ function getName (id) { name.textContent = id.substring(0, 10) + '...' bog().then(log => { - log.forEach(function (msg) { - if (msg.named == id) { - return name.textContent = '@' + msg.name - } - }) + for (var i = 0; i < log.length; i++ ) { + if (log[i].named == id) { + console.log(log[i].name) + return name.textContent = '@' + log[i].name + } + } }) return name |