mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: send proper @context value for posts (was missing)
This commit is contained in:
@@ -134,10 +134,7 @@ Mocks.actor = async (uid) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'@context': [
|
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||||
'https://www.w3.org/ns/activitystreams',
|
|
||||||
'https://w3id.org/security/v1',
|
|
||||||
],
|
|
||||||
id: `${nconf.get('url')}/uid/${uid}`,
|
id: `${nconf.get('url')}/uid/${uid}`,
|
||||||
url: `${nconf.get('url')}/user/${userslug}`,
|
url: `${nconf.get('url')}/user/${userslug}`,
|
||||||
followers: `${nconf.get('url')}/user/${userslug}/followers`,
|
followers: `${nconf.get('url')}/user/${userslug}/followers`,
|
||||||
@@ -187,6 +184,7 @@ Mocks.note = async (post) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const object = {
|
const object = {
|
||||||
|
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||||
id,
|
id,
|
||||||
type: 'Note',
|
type: 'Note',
|
||||||
to,
|
to,
|
||||||
|
|||||||
@@ -13,10 +13,7 @@ Actors.application = async function (req, res) {
|
|||||||
const name = meta.config.title || 'NodeBB';
|
const name = meta.config.title || 'NodeBB';
|
||||||
|
|
||||||
res.status(200).json({
|
res.status(200).json({
|
||||||
'@context': [
|
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||||
'https://www.w3.org/ns/activitystreams',
|
|
||||||
'https://w3id.org/security/v1',
|
|
||||||
],
|
|
||||||
id: `${nconf.get('url')}/actor`,
|
id: `${nconf.get('url')}/actor`,
|
||||||
url: `${nconf.get('url')}/actor`,
|
url: `${nconf.get('url')}/actor`,
|
||||||
inbox: `${nconf.get('url')}/inbox`,
|
inbox: `${nconf.get('url')}/inbox`,
|
||||||
|
|||||||
Reference in New Issue
Block a user