mirror of
https://github.com/dariusk/rss-to-activitypub.git
synced 2024-12-22 21:53:32 +02:00
fixing bug
This commit is contained in:
parent
45e1362aa2
commit
9d08138408
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue