aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bog.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/bog.js b/bog.js
index 63ec9be..072326c 100644
--- a/bog.js
+++ b/bog.js
@@ -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) {