feat(telegram): 移除评论删除功能,仅保留批准操作

- 移除 Telegram 通知中的“删除”按钮,仅保留“批准”按钮以简化审核流程
- 更新 Telegram webhook 回调处理,不再支持 delete 动作,并返回提示信息
- 同步更新相关文档,删除关于“删除”操作的描述
- 新增图标资源文件
This commit is contained in:
anghunk
2026-01-30 17:57:20 +08:00
parent e1568f60ff
commit 4ea50e9f69
4 changed files with 12 additions and 16 deletions

View File

@@ -267,9 +267,6 @@ export const postComment = async (c: Context<{ Bindings: Bindings }>) => {
if (defaultStatus === 'pending') {
buttons.push({ text: "批准", callback_data: `approve:${commentId}` });
buttons.push({ text: "删除", callback_data: `delete:${commentId}` });
} else {
buttons.push({ text: "删除", callback_data: `delete:${commentId}` });
}
const message = `
@@ -283,11 +280,14 @@ ${contentText}
#ID:${commentId}
`.trim();
await sendTelegramMessage(tgSettings.botToken, tgSettings.chatId, message, {
reply_markup: {
const options: any = {};
if (buttons.length > 0) {
options.reply_markup = {
inline_keyboard: [buttons]
}
});
};
}
await sendTelegramMessage(tgSettings.botToken, tgSettings.chatId, message, options);
}
} catch (tgError) {
console.error('Telegram Notification Failed:', tgError);