feat: 记录 Telegram 配置启用状态并初始化设备中间件响应写入器字段。
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 5m3s

This commit is contained in:
shanshanzhong 2026-01-06 22:55:10 -08:00
parent d0a3b36791
commit c4f327562f
2 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import (
)
func Telegram(svc *svc.ServiceContext) {
logger.Infof("Telegram Config Enable: %v", svc.Config.Telegram.Enable)
if !svc.Config.Telegram.Enable {
return
}

View File

@ -74,6 +74,8 @@ func NewResponseWriter(c *gin.Context, srvCtx *svc.ServiceContext) (rw *Response
c: c,
body: new(bytes.Buffer),
ResponseWriter: c.Writer,
size: noWritten,
status: defaultStatus,
}
rw.encryptionKey = srvCtx.Config.Device.SecuritySecret
rw.encryptionMethod = "AES"