mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
feat: temporarily deny handling non-public notes
This commit is contained in:
@@ -19,6 +19,11 @@ inbox.create = async (req) => {
|
||||
const { object } = req.body;
|
||||
const postData = await activitypub.mocks.post(object);
|
||||
|
||||
// Temporary, reject non-public notes.
|
||||
if (![...postData._activitypub.to, ...postData._activitypub.cc].includes(activitypub._constants.publicAddress)) {
|
||||
throw new Error('[[error:activitypub.not-implemented]]');
|
||||
}
|
||||
|
||||
if (postData) {
|
||||
await activitypub.notes.assert(0, [postData]);
|
||||
const tid = await activitypub.notes.assertTopic(0, postData.pid);
|
||||
|
||||
Reference in New Issue
Block a user