fixes + theme

This commit is contained in:
th committed 2026-04-11 13:01:27 +02:00
1 parent 5af49655d6
commit 22f73ab3b9
25 files changed
+1004 -206

No files matched your search

+8 -2
View File
@@ -132,7 +132,8 @@ PluginManager::instance()->onApiRoute(function (string $route, string $method) {
}
$envelope = chatEncrypt($body, $r['key']);
$ch = curl_init(rtrim($r['url'], '/') . '/api/chat');
$relayChatUrl = rtrim($r['url'], '/') . '/api/chat';
$ch = curl_init($relayChatUrl);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
@@ -152,7 +153,12 @@ PluginManager::instance()->onApiRoute(function (string $route, string $method) {
$relayErr = '';
$decoded = json_decode($response, true);
if (is_array($decoded) && !empty($decoded['error'])) $relayErr = ' — ' . $decoded['error'];
chatJson(['ok' => false, 'error' => "relay returned HTTP $status$relayErr"]);
chatJson([
'ok' => false,
'error' => "relay returned HTTP $status$relayErr",
'url' => $relayChatUrl,
'response_body' => is_string($response) ? substr($response, 0, 500) : null,
]);
}
$resData = json_decode($response, true);