diff options
| author | Ev Bogue <ev@evbogue.com> | 2019-05-01 21:14:40 -0500 | 
|---|---|---|
| committer | Ev Bogue <ev@evbogue.com> | 2019-05-01 21:14:40 -0500 | 
| commit | 00c73902065147e4d6223643f3a80f0ec1b58b2f (patch) | |
| tree | bb4fab8ba68a6ed8b1a67219b28efaae3f277c89 | |
| parent | b11e664970b0456d5e48f884f0b06975dd23fd8b (diff) | |
no need to pass timestamp to publish, return getName to working order
| -rw-r--r-- | bog.js | 14 | 
1 files changed, 13 insertions, 1 deletions
| @@ -59,6 +59,14 @@ 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 +      }  +    }) +  }) +    return name  } @@ -83,8 +91,12 @@ async function bog (feed) {  async function publish (post, keys) {    post.author = keys.publicKey -  var message = { author: keys.publicKey } +  post.timestamp = Date.now()  +  var message = {  +    author: keys.publicKey  +  } +      var feed = await localforage.getItem(keys.publicKey)    if (feed) { | 
