Quick Reply
Overview
Quick Reply is a set of option buttons rendered above the keyboard in a LINE chat, letting users tap a choice instead of typing. This module acts as a central library for the button sets an organisation has authored, so they can be attached to messages from several places.
It is a module written fresh for the Go implementation with no NestJS predecessor. Its structure
follows existing lightweight modules such as Content Category and Template Message. What sets it
apart is the references endpoint, which reports where a button set is currently in use before
anyone deletes it.
Business Flow
GET /api/quick-replylists button sets with pagination, scoped to the user'slineOaId. Every query specifiesdeleted_date IS NULLexplicitly, because the entity does not usegorm.DeletedAt.POST /api/quick-replycreates a new set, taking a set name plus the list of buttons and the action attached to each one.GET /api/quick-reply/:idreturns the details. An id that does not exist, or that belongs to a different OA, returnshttpx.NotFoundrather than an empty result.GET /api/quick-reply/:id/referencesreports where the set is referenced, so the UI can warn about the impact before deletion.PUT /api/quick-reply/:idupdates a set.DELETE /api/quick-reply/:idperforms a soft delete by stamping thedeleted_datecolumn.- When a message is actually sent, the selected button set is attached to the payload delivered to LINE.
Key Files & Functions
Core code lives in internal/modules/quickreply/, comprising controller.go, service.go,
and dto.go.
| Method | Route | Handler | Policy (metadata) |
|---|---|---|---|
| GET | /api/quick-reply | ct.list | readAll quick-reply |
| POST | /api/quick-reply | ct.create | create quick-reply |
| GET | /api/quick-reply/:id | ct.get | read quick-reply |
| GET | /api/quick-reply/:id/references | ct.references | read quick-reply |
| PUT | /api/quick-reply/:id | ct.update | update quick-reply |
| DELETE | /api/quick-reply/:id | ct.delete | delete quick-reply |
Routes are registered on the authed group, which applies global JWT authentication; no
ModuleGate wraps them.
Connections to Other Services
- Access control — requests must pass global
JwtAuthand the token must carry alineOaId. ThePolicyModuleQuickReply = "quick-reply"enum is aligned with cms-web'sMODULE_URL.QUICK_REPLYso policy enforcement can be switched on later without renaming. - Tables —
quick_reply, which uses a plaindeleted_datesoft-delete column rather thangorm.DeletedAt. - Context — reads
lineOaIdfrom CLS to scope every query. - Design spec —
docs/superpowers/specs/2026-07-25-quick-reply-design.md - Related modules — Auto Response, Rich Message, and Workflow.