mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
feat: handle incoming non-public activities as chat message, #12834
This commit is contained in:
@@ -62,9 +62,9 @@ async function announce(id, activity) {
|
||||
inbox.create = async (req) => {
|
||||
const { object } = req.body;
|
||||
|
||||
// Temporary, reject non-public notes.
|
||||
// Alternative logic for non-public objects
|
||||
if (![...object.to, ...object.cc].includes(activitypub._constants.publicAddress)) {
|
||||
throw new Error('[[error:activitypub.not-implemented]]');
|
||||
return await activitypub.notes.assertPrivate(object);
|
||||
}
|
||||
|
||||
const asserted = await activitypub.notes.assert(0, object);
|
||||
|
||||
Reference in New Issue
Block a user