tim plugin, chat bot sync notifications, test fixes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.6 committed 2026-04-14 19:32:17 +02:00
1 parent ca47052768
commit 3b7c7cf5ac
21 files changed
+827 -14

No files matched your search

+11
View File
@@ -648,6 +648,17 @@ function collabSyncCards(PDO $db): array {
$stats['pulled']++;
if ($foreignAuthor) $unreadBuckets[$c['bucket_uid']] = true;
// Notify the card's author that we synced it (best-effort; bot
// chat message, rendered in orange on the author's side). Only
// fires for cards authored by someone else.
if ($foreignAuthor && !empty($c['author_username'])) {
$cardTitle = trim((string)($fields['title'] ?? '')) ?: '(untitled)';
collabRelayCall('/api/chat/bot', 'POST', [
'recipient' => $c['author_username'],
'body' => $selfUser . ' synced: ' . $cardTitle,
]);
}
// Fetch missing attachments referenced in the body.
$pulledBody = $fields['body'] ?? '';
if ($pulledBody && preg_match_all('#uploads/([a-f0-9]+\.\w+)#', $pulledBody, $fm)) {