<?php
require_once __DIR__ . '/../includes/bootstrap.php';
header('Content-Type: application/json');
$messages = ugfx_chat_messages(150);
echo json_encode([
    'ok' => true,
    'messages' => $messages,
    'meta' => [
        'server_time' => date('c'),
    ],
], JSON_UNESCAPED_SLASHES);
