Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@NicholaiVogel
Copy link

Summary

This PR adds webhook-based bot integration for Nextcloud Talk, available since Nextcloud 27.1 / Talk 17.1. The integration uses Activity Streams 2.0 format for incoming webhooks and the bot API for outbound messages.

  • Webhook server receives messages via POST /nextcloud-talk-webhook
  • HMAC-SHA256 signature verification for security
  • Bot API for sending messages back to conversations
  • Full ChannelPlugin implementation with config, security, outbound, gateway adapters
  • Onboarding wizard for easy setup
  • Multi-account support

Files created

Core implementation (src/nextcloud-talk/):

  • types.ts - Activity Streams 2.0 payload types
  • signature.ts - HMAC-SHA256 signature verification/generation
  • accounts.ts - multi-account resolution and token handling
  • send.ts - message sending via bot API
  • monitor.ts - webhook server for incoming messages
  • format.ts - markdown utilities

Extension plugin (extensions/nextcloud-talk/):

  • Full ChannelPlugin with all required adapters
  • Catalog entry for CLI installation

Config & SDK:

  • Zod schema and TypeScript types
  • Plugin SDK exports for external use

Example config

channels:
  nextcloud-talk:
    enabled: true
    baseUrl: "https://cloud.example.com"
    botSecret: "shared-secret-from-occ-install"
    webhookPort: 8788
    dmPolicy: "pairing"

Then on the Nextcloud server:

./occ talk:bot:install "Clawdbot" "<secret>" "<webhook-url>" --feature reaction

Testing

  • TypeScript compilation passes (pnpm build)
  • Manual testing with Nextcloud instance (not yet tested live - contributor has Nextcloud available for testing)

AI transparency

This PR was AI-assisted (Claude). Created on behalf of @NicholaiVogel who said "pretty please" :)

I understand what the code does - it follows the existing channel plugin patterns from Telegram/Discord/Slack implementations but adapted for Nextcloud Talk's webhook-based bot API.


Thanks for considering this! Happy to address any feedback.

@NicholaiVogel NicholaiVogel force-pushed the feat/nextcloud-talk-channel branch from 8aebb60 to 997c3b1 Compare January 20, 2026 07:45
Add webhook-based bot integration for Nextcloud Talk (available since
Nextcloud 27.1 / Talk 17.1). The integration uses Activity Streams 2.0
format for incoming webhooks and the bot API for outbound messages.

Core implementation:
- types.ts: Activity Streams 2.0 payload types
- signature.ts: HMAC-SHA256 signature verification/generation
- accounts.ts: multi-account resolution and token handling
- send.ts: message sending via bot API
- monitor.ts: webhook server for incoming messages
- format.ts: markdown utilities

Extension plugin:
- ChannelPlugin implementation with full adapter support
- config, security, outbound, gateway, groups, messaging adapters
- onboarding wizard for setup
- catalog entry for CLI installation

Config schema and SDK exports for external use.
@NicholaiVogel NicholaiVogel force-pushed the feat/nextcloud-talk-channel branch from 997c3b1 to 2c14c25 Compare January 20, 2026 07:51
@steipete
Copy link
Contributor

Thanks! We rebuilt this as a real plugin with stricter boundaries and a shared policy pipeline, so we’re closing the PR in favor of the new implementation.

What changed vs the PR:

  • Moved Nextcloud Talk entirely under extensions/nextcloud-talk (plugin entrypoint, runtime, monitor, send, onboarding, config schema, docs).
  • Added optional room-type lookup for DM vs room detection (OCS API) with caching and config (apiUser/apiPassword/apiPasswordFile).
  • Rewired inbound handling to shared channel helpers (allowlist/mention gating) instead of bespoke core logic; group allowlists now respect room-specific overrides.
  • Removed hardcoded channel plugin catalog entries; catalog/onboarding now read clawdbot.channel + clawdbot.install from each plugin’s package.json.
  • Kept plugin config validation in clawdbot.plugin.json; package metadata is separate (no schema coupling).
  • Updated docs and changelog with proper PR attribution.

Goal: keep core lean and make the Nextcloud Talk channel fully plugin-owned with consistent policy behavior.

@steipete steipete closed this Jan 20, 2026
@NicholaiVogel
Copy link
Author

this is awesome, thank you! nicholai is currently jumping around like an absolute buffoon - you'd think he won the lottery but no, it's just proper plugin architecture that's got him this excited ¯_(ツ)_/¯

really appreciate you taking the time to rebuild this properly. the plugin-first approach with shared channel helpers makes way more sense than what we had. excited to see nextcloud talk support land in a way that fits the project's direction.

cheers!

— claude, on behalf of nicholai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants