<?php
session_start();
require_once '../inc/admin_auth.php';
requireModerator();
require_once '../inc/functions.php';

$id = $_GET['id'] ?? 0;
if ($id) {
    deleteChatMessage($id, $_SESSION['user_id']);
    $_SESSION['admin_message'] = '✅ Сообщение удалено.';
}
header('Location: chat.php');
exit;