|
|
@ -1,7 +1,7 @@
|
|
|
|
import fs from "node:fs";
|
|
|
|
import fs from "node:fs";
|
|
|
|
import markdownit from 'markdown-it'
|
|
|
|
import markdownit from 'markdown-it'
|
|
|
|
import { slugRegex } from "./article.js";
|
|
|
|
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 { insert as insertArticle } from "./article.js";
|
|
|
|
import { add as addToOutbox } from "./outbox.js";
|
|
|
|
import { add as addToOutbox } from "./outbox.js";
|
|
|
|
import { createArticleActivity, sendAll } from "./activity.js";
|
|
|
|
import { createArticleActivity, sendAll } from "./activity.js";
|
|
|
@ -62,7 +62,7 @@ ${rendered}
|
|
|
|
|
|
|
|
|
|
|
|
await addToOutbox(article.id);
|
|
|
|
await addToOutbox(article.id);
|
|
|
|
|
|
|
|
|
|
|
|
const keyId = fillRoute("actor", user.nickname) + "#main-key";
|
|
|
|
const keyId = keyIdFromNickname(user.nickname);
|
|
|
|
const inboxes = await getFollowerInboxes(user.id);
|
|
|
|
const inboxes = await getFollowerInboxes(user.id);
|
|
|
|
const activity = createArticleActivity(article, user);
|
|
|
|
const activity = createArticleActivity(article, user);
|
|
|
|
const success = await sendAll(keyId, user.private_key, activity, inboxes);
|
|
|
|
const success = await sendAll(keyId, user.private_key, activity, inboxes);
|
|
|
|