mirror of
https://hk.gh-proxy.com/https://github.com/NodeBB/nodebb-plugin-question-and-answer.git
synced 2025-10-03 04:31:26 +08:00
dont add thread tools if cant set as answer etc.
This commit is contained in:
parent
c3e4bbbdc9
commit
781a37e402
1 changed files with 3 additions and 0 deletions
|
@ -197,6 +197,9 @@ plugin.filterPostGetPostSummaryByPids = async function (hookData) {
|
|||
};
|
||||
|
||||
plugin.addThreadTool = async function (hookData) {
|
||||
if (!await canSetAsSolved(hookData.topic.tid, hookData.uid)) {
|
||||
return hookData;
|
||||
}
|
||||
const isSolved = parseInt(hookData.topic.isSolved, 10);
|
||||
|
||||
if (parseInt(hookData.topic.isQuestion, 10)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue