use keyid builder
This commit is contained in:
parent
c05d5a66c9
commit
5423bf31b7
|
@ -1,7 +1,7 @@
|
|||
import fs from "node:fs";
|
||||
import markdownit from 'markdown-it'
|
||||
import { slugRegex } from "./article.js";
|
||||
import { newUser, get as getUserByNickname, getFollowerInboxes } from "./user.js";
|
||||
import { newUser, get as getUserByNickname, getFollowerInboxes, keyIdFromNickname } from "./user.js";
|
||||
import { insert as insertArticle } from "./article.js";
|
||||
import { add as addToOutbox } from "./outbox.js";
|
||||
import { createArticleActivity, sendAll } from "./activity.js";
|
||||
|
@ -62,7 +62,7 @@ ${rendered}
|
|||
|
||||
await addToOutbox(article.id);
|
||||
|
||||
const keyId = fillRoute("actor", user.nickname) + "#main-key";
|
||||
const keyId = keyIdFromNickname(user.nickname);
|
||||
const inboxes = await getFollowerInboxes(user.id);
|
||||
const activity = createArticleActivity(article, user);
|
||||
const success = await sendAll(keyId, user.private_key, activity, inboxes);
|
||||
|
|
Loading…
Reference in New Issue