mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: issue where incrementing user hash fields didn't use the right key name for remote announce @barisusakli
This commit is contained in:
@@ -383,7 +383,8 @@ module.exports = function (User) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function incrDecrUserFieldBy(uid, field, value, type) {
|
async function incrDecrUserFieldBy(uid, field, value, type) {
|
||||||
const newValue = await db.incrObjectFieldBy(`user:${uid}`, field, value);
|
const prefix = `user${activitypub.helpers.isUri(uid) ? 'Remote' : ''}`;
|
||||||
|
const newValue = await db.incrObjectFieldBy(`${prefix}:${uid}`, field, value);
|
||||||
plugins.hooks.fire('action:user.set', { uid: uid, field: field, value: newValue, type: type });
|
plugins.hooks.fire('action:user.set', { uid: uid, field: field, value: newValue, type: type });
|
||||||
return newValue;
|
return newValue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user