mirror of
https://github.com/dariusk/rss-to-activitypub.git
synced 2024-11-22 09:19:19 +02:00
fixing bug
This commit is contained in:
parent
45e1362aa2
commit
9d08138408
|
@ -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 New Issue