Integrations that store the contact's LID as its number (255284433936406) failed with 'no LID found for [email protected]'. When the number is not a registered phone and the instance's LID store maps it to a phone number, send to <number>@lid instead. GET /server/ok now also returns the running version, so a deployment can be checked without reading the startup log. Co-Authored-By: Claude Opus 5.5 <[email protected]>
24 lines
428 B
Go
24 lines
428 B
Go
package server_handler
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
type ServerHandler interface {
|
|
ServerOk(ctx *gin.Context)
|
|
}
|
|
|
|
type serverHandler struct {
|
|
version string
|
|
}
|
|
|
|
// ServerOk implements ServerHandler.
|
|
func (s *serverHandler) ServerOk(ctx *gin.Context) {
|
|
ctx.JSON(200, gin.H{
|
|
"status": "ok",
|
|
"version": s.version,
|
|
})
|
|
}
|
|
|
|
func NewServerHandler(version string) ServerHandler {
|
|
return &serverHandler{version: version}
|
|
}
|