dont add thread tools if cant set as answer etc.

This commit is contained in:
Barış Soner Uşaklı 2025-04-17 13:49:21 -04:00
parent c3e4bbbdc9
commit 781a37e402

View file

@ -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)) {