mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
feat: send out Update(Actor) when a category is edited
This commit also updates the activity sent out when a user profile is edited. The activity is now sent to all known actors. closes #12655
This commit is contained in:
@@ -8,6 +8,8 @@ const user = require('../user');
|
||||
const groups = require('../groups');
|
||||
const privileges = require('../privileges');
|
||||
|
||||
const activitypubApi = require('./activitypub');
|
||||
|
||||
const categoriesAPI = module.exports;
|
||||
|
||||
const hasAdminPrivilege = async (uid, privilege = 'categories') => {
|
||||
@@ -63,6 +65,7 @@ categoriesAPI.update = async function (caller, data) {
|
||||
const payload = {};
|
||||
payload[cid] = values;
|
||||
await categories.update(payload);
|
||||
await activitypubApi.update.category(caller, { cid });
|
||||
};
|
||||
|
||||
categoriesAPI.delete = async function (caller, { cid }) {
|
||||
|
||||
Reference in New Issue
Block a user