fix(users): restore WeChat template notification flow

This commit is contained in:
kate522 committed 2026-11-10 20:54:24 +08:00
1 parent 30ceab4615
commit 7fe26d3fff
18 files changed
+1051 -763

No files matched your search

+7 -3
View File
@@ -179,7 +179,7 @@ class ReportCenter {
global $wpdb;
$existing = $wpdb->get_row($wpdb->prepare(
"SELECT id, reporter_id, notes_json FROM {$table} WHERE id = %d",
"SELECT id, reporter_id, notes_json, category, reason, created_at FROM {$table} WHERE id = %d",
$report_id
));
@@ -205,9 +205,13 @@ class ReportCenter {
}
$result = $wpdb->update($table, $update_data, ['id' => $report_id], $format, ['%d']);
if ($result !== false) {
if ($result > 0) {
// 第 4 参携带处理说明:邮件通知(report_result)与站内信均需反馈给举报人。
do_action('jio_report_status_changed', $report_id, (int) ($existing->reporter_id ?? 0), $new_status, $note_clean);
do_action('jio_report_status_changed', $report_id, (int) ($existing->reporter_id ?? 0), $new_status, $note_clean, [
'category' => (string) ($existing->category ?? ''),
'reason' => (string) ($existing->reason ?? ''),
'created_at' => (string) ($existing->created_at ?? ''),
]);
$this->notify_reporter_status_changed((int) ($existing->reporter_id ?? 0), $new_status, $note_clean);
}
return $result !== false;