feat: add command to toggle debug mode

- Add lib/Command/DebugToggle.php to enable/disable debug endpoint via CLI
- Update lib/Controller/WebhookController.php to check debug status
- Add support for base64 attachments in lib/Service/TalkService.php
- Bump version in appinfo/info.xml to 1.1.0
- Update INSTALL.md and README.md documentation
This commit is contained in:
kyle
2026-06-12 17:42:36 -07:00
parent 88ad358eef
commit 28d0187760
6 changed files with 193 additions and 2 deletions
+17 -1
View File
@@ -704,6 +704,22 @@ class TalkService {
$richObjects[] = $richObj;
}
}
} elseif (!empty($attachment['base64'] ?? '')) {
// Base64-encoded attachment (Apprise library JSON method)
$fileData = base64_decode($attachment['base64'], true);
if ($fileData === false) {
continue;
}
$fileName = $attachment['filename'] ?? $attachment['name'] ?? 'attachment';
$mimeType = $attachment['mimetype'] ?? $attachment['mimeType'] ?? 'application/octet-stream';
$uploadPath = $this->uploadImage($roomToken, $fileName, $fileData, $mimeType);
if ($uploadPath !== null) {
$richObj = $this->buildRichObject($uploadPath, $mimeType, $roomToken);
if ($richObj !== null) {
$richObjects[] = $richObj;
}
}
}
}
}
@@ -877,7 +893,7 @@ class TalkService {
// or the message is silently dropped.
$botDisplayName = $this->getBotDisplayNameForRoom($roomToken);
// Build message body for Chat API v4
// Build message body for Chat API v1
$body = [
'message' => $message,
'actorType' => 'users',