From 9d0813840862ef7d94c5e84becae6c73b7e94474 Mon Sep 17 00:00:00 2001 From: Darius Kazemi Date: Fri, 29 Mar 2019 09:23:05 -0700 Subject: [PATCH] fixing bug --- updateFeeds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updateFeeds.js b/updateFeeds.js index 1300c84..5623c8f 100644 --- a/updateFeeds.js +++ b/updateFeeds.js @@ -234,6 +234,7 @@ function sendCreateMessage(text, name, domain, req, res, item) { // console.log(`${name}@${domain}`); let result = db.prepare('select followers from accounts where name = ?').get(`${name}@${domain}`); let followers = JSON.parse(result.followers); + const guidNote = crypto.randomBytes(16).toString('hex'); // console.log(followers); if (!followers) { followers = []; @@ -242,7 +243,6 @@ function sendCreateMessage(text, name, domain, req, res, item) { let inbox = follower+'/inbox'; let myURL = new URL(follower); let targetDomain = myURL.hostname; - const guidNote = crypto.randomBytes(16).toString('hex'); let message = createMessage(text, name, domain, item, follower, guidNote); signAndSend(message, name, domain, req, res, targetDomain, inbox); }