diff --git a/README.md b/README.md index 8a1ebf2..98dc7ad 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,7 @@ ### Usage > POST /generic/{matrixRoom}/{matrixUser}/{matrixPassword} This is a generic handler that will accept any form of data and pass it through to Matrix using the appropriate JSON format. + +### Usage +> POST /slack/{matrixRoom}/{matrixUser}/{matrixPassword} +This is a Slack-friendly handler that will accept any form of Slack data and pass through just the text to Matrix using the appropriate JSON format. diff --git a/pkg/server/server.go b/pkg/server/server.go index 8d4cbb3..d246c5e 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -32,6 +32,7 @@ func Run(info *router.BuildInfo) error { router := router.NewRouter(info) router.HandleWithMetrics("/generic/{matrixRoom}/{matrixUser}/{matrixPassword}", generic.Handle(conf)).Methods(http.MethodPost) + router.HandleWithMetrics("/slack/{matrixRoom}/{matrixUser}/{matrixPassword}", generic.Handle(conf)).Methods(http.MethodPost) srv := http.Server{ Addr: fmt.Sprintf(":%d", conf.Port),