Compare commits

..

No commits in common. "5423bf31b7a106f8b4eda2776bc40e18512b52de" and "a789a54fbbb8f7d4c60eb4932d2cfec6ba9c2b99" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -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, keyIdFromNickname } from "./user.js"; import { newUser, get as getUserByNickname, getFollowerInboxes } 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 = keyIdFromNickname(user.nickname); const keyId = fillRoute("actor", user.nickname) + "#main-key";
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);

View File

@ -107,4 +107,4 @@ export const getFollowerInboxes = async (userId: number): Promise<string[]> =>
return [...inboxes]; return [...inboxes];
}); });
export const keyIdFromNickname = (nickname: string) => fillRoute("actor", nickname) + "#main-key"; export const getKeyId = (nickname: string) => fillRoute("actor", nickname) + "#main-key";