<?php
require_once __DIR__ . '/../config/config.php';
$message_id = $argv[1] ?? null;
if (!$message_id) { echo "Usage: php find_message_by_id.php <message_id>\n"; exit; }
$db = Database::getInstance();
$res = $db->fetch('SELECT * FROM conversations WHERE message_id = ?', [$message_id]);
if ($res) echo json_encode($res, JSON_PRETTY_PRINT) . "\n"; else echo "Not found\n";
