feat: match hook property to topic property

v1.18.x
Barış Soner Uşaklı 5 years ago
parent bfad457275
commit 0e58fa33eb

@ -93,7 +93,8 @@ module.exports = function (Topics) {
throw new Error('[[error:no-privileges]]'); throw new Error('[[error:no-privileges]]');
} }
await Topics.setTopicField(tid, 'locked', lock ? 1 : 0); await Topics.setTopicField(tid, 'locked', lock ? 1 : 0);
topicData.isLocked = lock; topicData.isLocked = lock; // deprecate in v2.0
topicData.locked = lock;
plugins.fireHook('action:topic.lock', { topic: _.clone(topicData), uid: uid }); plugins.fireHook('action:topic.lock', { topic: _.clone(topicData), uid: uid });
return topicData; return topicData;

Loading…
Cancel
Save