fix: urls in posts and announces

This commit is contained in:
Julian Lam
2024-02-07 14:29:47 -05:00
parent a61e7fe79b
commit 4fb6574cf7
2 changed files with 11 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ const user = require('../user');
const posts = require('../posts');
const topics = require('../topics');
const categories = require('../categories');
const utils = require('../utils');
const activitypub = require('.');
const helpers = require('./helpers');
@@ -115,7 +116,7 @@ inbox.announce = async (req) => {
await topics.events.log(tid, {
type: 'announce',
uid: actor,
href: `/post/${pid}`,
href: utils.isNumber(pid) ? `/post/${pid}` : pid,
pid,
timestamp,
});