diff --git a/config.php b/config.php index 9946605..7830864 100644 --- a/config.php +++ b/config.php @@ -1,7 +1,7 @@ 5, ]); - curl_exec($bch); + $bRes = curl_exec($bch); + $bStat = curl_getinfo($bch, CURLINFO_HTTP_CODE); curl_close($bch); + @error_log('[hyprcrd] sync-event POST → ' . $senderName + . ' status=' . $bStat + . ' body=' . substr((string)$bRes, 0, 120)); } // Download attachments diff --git a/public/plugins/collab-buckets/backend.php b/public/plugins/collab-buckets/backend.php index 6a6e051..3dbf9ef 100644 --- a/public/plugins/collab-buckets/backend.php +++ b/public/plugins/collab-buckets/backend.php @@ -707,10 +707,14 @@ function collabSyncCards(PDO $db): array { // authored by someone else. if ($foreignAuthor && !empty($c['author_username'])) { $cardTitle = trim((string)($fields['title'] ?? '')) ?: '(untitled)'; - collabRelayCall('/api/sync-events', 'POST', [ + $evRes = collabRelayCall('/api/sync-events', 'POST', [ 'recipient' => $c['author_username'], 'body' => $selfUser . ' synced: ' . $cardTitle, ]); + @error_log('[hyprcrd] sync-event POST → ' . $c['author_username'] + . ' ok=' . ($evRes['ok'] ?? 'n/a') + . ' status=' . ($evRes['status'] ?? '-') + . ' err=' . substr((string)($evRes['error'] ?? ''), 0, 120)); } }