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 |
ISlashCommand — executor() 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
Description
Create a Rocket.Chat App that registers
/standupvia the Apps Engine SDK and forwards invocations to the Go bot via an HTTP webhook.Motivation
The
commands.registerREST API does not exist in standard Rocket.Chat (404). The!standupprefix works but/standupis blocked by Rocket.cat. A Rocket.Chat App is the proper way to register a custom slash command.Plan
New directory:
rocketchat-standup-app/app.jsontsconfig.jsonpackage.json@rocket.chat/apps-enginesrc/App.tsextendConfiguration()registersStandupCommand, defines AppSettingssrc/commands/StandupCommand.tsISlashCommand—executor()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:
internal/webhook/webhook.goPOST /webhook/slash-command, Bearer auth, dispatches via existing command pipelineinternal/config/config.goWebhookListen,WebhookSecretcmd/bot/main.goRegisterSlashCommand()callinternal/rocket/client.goRegisterSlashCommand()methodBuild/release:
.zipviarc-apps package.zipas release assetAcceptance Criteria
/standupslash commandRegisterSlashCommand()removed from Go bot.zipproduced in release workflow