Files
nc_bot_webhooks/TODO.md
T
kyle 005f76701e docs: update documentation, add future tasks, and fix debug endpoint security
- **Documentation Overhaul**:
  - **README.md**: Restructured installation guide to align with Nextcloud 33+ paths (e.g., "Personal Settings → Security"), added curl examples, updated known limitations, and added a "Future Features" section.
  - **agent.md**: Updated architecture documentation to reflect `TalkService.php` growth (1138 to 1904 lines), updated constructor parameters, and corrected method documentation (e.g., `buildRichObject` now creates TYPE_ROOM shares, `postToRoom` uses query params).
  - **architecture.md**: Added notes regarding the admin gate for the debug endpoint.

- **New Files**:
  - Added `Future to-do.md` to track planned features (inbound messages, filtering, etc.).
  - Added `TODO.md` to track pending tasks and code cleanup.

- **Code Fixes**:
  - **lib/Controller/WebhookController.php**: Re-applied `#[AdminRequired]` attribute to the `debug()` method to enforce admin authentication.
  - **lib/Service/TalkService.php**: Updated docblock for `buildRichObject` to clarify it creates TYPE_ROOM shares.
  - **lib/Settings/Admin.php** & **templates/adminSettings.php**: Corrected bot password generation instructions to point to the correct Nextcloud settings path.

- **Configuration**:
  - **appinfo/info.xml**: Bumped version to 1.2.1 and updated `max-version` to 35.
2026-06-16 13:23:31 -07:00

2.8 KiB

nc_bot_webhooks — Pending Tasks

Debug Endpoint

  • Re-enable admin auth requirement for /debug endpoint (WebhookController.php)
  • Re-enable admin gate + update docs
  • Add auto-disable timer (2-hour TTL) to prevent accidental prolonged exposure

README / Documentation Fixes

  • Section 4: App password path — confirmed "Personal Settings → Security" is correct
  • Section 4 (FIXED): Template hint templates/adminSettings.php:11 — confirmed correct path
  • Section 4: l10n string lib/Settings/Admin.php:43 — confirmed correct path
  • Section 5: "Administration → Additional settings" → confirmed correct for current NC
  • Section 3: "Settings → Users" → confirmed correct for current NC
  • Security table: allow_local_address: true description — clarified wording
  • Image cleanup cron grep — already correct in README (grep 'nc_bot_webhooks: purged')
  • Troubleshooting: ncdiscordhook app ID — not in README (only in agent.md, which is correct)
  • Payload Mapping: mapPayload title — confirmed bold formatting correct
  • Payload Mapping: type icon mapping — confirmed actual emojis listed
  • Home Assistant YAML: message vs bodymessage works via fallback, no change needed
  • Version: bumped to 1.2.1 (info.xml + agent.md updated)
  • NC max-version: docs say 33, info.xml says 35 — agent.md updated

Code Documentation Fixes

  • buildRichObject docs describe public link shares; code uses TYPE_ROOM shares
  • postToRoom docs describe JSON body posting; code uses query params
  • prependDisplayName signature — already documents all 3 params including $typeIcon
  • getRooms() response schema missing type, type_label, object_type
  • saveConfig docs missing disabled_rooms field
  • ensureBotParticipants visibility — already documented as private with call context
  • getBaseUrl() resolution incompletely documented
  • TalkService constructor params: docs say 8, actual 17
  • TalkService.php size: docs say 1138 lines, actual 1904
  • All line numbers in agent.md are stale

Code Issues

  • Room type filter type IN (1,2,3) misses type 6 (Note to self) and future types

Cleanup

  • config:app:delete nc_bot_webhooks routes — removed from README (routes are defined in routes.php, not stored in DB)
  • composer.json exists but migration plan says delete it (resolved — keep it for dev tooling, update migration plan)
  • agent.md dead references cleaned: app (copy).svg, composer/autoload.php, composer/autoload_psr4.php (removed from directory tree). tests/, phpunit.xml.dist, .gitea/workflows/ci.yml were not actually in agent.md (false positives)
  • webhook-setup.md — added clear label "Nextcloud Talk Native Bot Setup (bots-v1)" with note distinguishing from nc_bot_webhooks