refactor: remove forum and topic feature chains

This commit is contained in:
2026-08-17 14:52:19 +08:00
parent 698e3750f9
commit 6c6c462df8
69 changed files with 339 additions and 2057 deletions
+3 -4
View File
@@ -173,7 +173,7 @@ class WeChatNotify {
if (empty($config['enabled'])) return;
// 仅特定类型通知发送微信
$allowed_types = ['comment_reply', 'system_notice', 'order_paid', 'credits_change', 'forum_reply'];
$allowed_types = ['comment_reply', 'system_notice', 'order_paid', 'credits_change'];
if (!in_array($type, $allowed_types, true)) return;
$this->send($user_id, $type, $data);
@@ -219,7 +219,7 @@ class WeChatNotify {
'has_template' => !empty($config['template_id']),
'bound_users' => $bound_count,
'app_secret' => !empty($config['app_secret']) ? '***' : '',
'allowed_types' => ['comment_reply', 'system_notice', 'order_paid', 'credits_change', 'forum_reply'],
'allowed_types' => ['comment_reply', 'system_notice', 'order_paid', 'credits_change'],
];
}
@@ -234,7 +234,6 @@ class WeChatNotify {
'system_notice' => true,
'order_paid' => true,
'credits_change' => false,
'forum_reply' => false,
];
}
return $subs;
@@ -244,7 +243,7 @@ class WeChatNotify {
* Update notification subscriptions for a user.
*/
public function update_user_subscriptions(int $user_id, array $subscriptions): bool {
$allowed = ['comment_reply', 'system_notice', 'order_paid', 'credits_change', 'forum_reply'];
$allowed = ['comment_reply', 'system_notice', 'order_paid', 'credits_change'];
$clean = [];
foreach ($allowed as $key) {
$clean[$key] = !empty($subscriptions[$key]);