Skip to content

feat: Rocket.Chat App to register /standup slash command #43

@sunba91-su

Description

@sunba91-su

Description

Create a Rocket.Chat App that registers /standup via the Apps Engine SDK and forwards invocations to the Go bot via an HTTP webhook.

Motivation

The commands.register REST API does not exist in standard Rocket.Chat (404). The !standup prefix works but /standup is blocked by Rocket.cat. A Rocket.Chat App is the proper way to register a custom slash command.

Plan

New directory: rocketchat-standup-app/

File Purpose
app.json Manifest with UUID id, version, settings (webhook_url, webhook_secret)
tsconfig.json TypeScript config
package.json Dev dep on @rocket.chat/apps-engine
src/App.ts Main class — extendConfiguration() registers StandupCommand, defines AppSettings
src/commands/StandupCommand.ts ISlashCommandexecutor() POSTs payload to Go bot webhook with Bearer auth, stays silent (no reply)

Webhook payload:

{
  "command": "standup",
  "arguments": ["submit", "--team", "myteam"],
  "user": { "id": "abc", "username": "john" },
  "room": { "id": "xyz", "slug": "general" }
}

Go bot changes:

File Change
internal/webhook/webhook.go New — HTTP server, POST /webhook/slash-command, Bearer auth, dispatches via existing command pipeline
internal/config/config.go Add WebhookListen, WebhookSecret
cmd/bot/main.go Start webhook goroutine after connect; remove RegisterSlashCommand() call
internal/rocket/client.go Remove RegisterSlashCommand() method

Build/release:

  • Makefile target to build App .zip via rc-apps package
  • Release workflow: upload .zip as release asset
  • CI: verify App compiles

Acceptance Criteria

  • Rocket.Chat App registers /standup slash command
  • App forwards slash command invocations to Go bot webhook
  • Go bot webhook parses payload and dispatches through existing command pipeline
  • Bot responds to the room/channel via existing Rocket.Chat connection
  • RegisterSlashCommand() removed from Go bot
  • App .zip produced in release workflow
  • Documentation updated (README, CONTRIBUTING, .env.example)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions