@@ -34,7 +34,7 @@ func ReadAppConfig() error {
3434 defer initInterval ()
3535 defer initRateLimiter ()
3636 if ! sys .Exist (res .AppConfigPath ) {
37- configBytes , err := json .MarshalIndent (DefaultappConfig , "" , "\t " )
37+ configBytes , err := json .MarshalIndent (DefaultAppConfig , "" , "\t " )
3838 if err != nil {
3939 log .Err ("[CONFIG] marshal default app config failed: %v" , err )
4040 return err
@@ -44,7 +44,7 @@ func ReadAppConfig() error {
4444 log .Err ("[CONFIG] write default app config failed: %v" , err )
4545 return err
4646 }
47- Config = DefaultappConfig
47+ Config = DefaultAppConfig
4848 return nil
4949 }
5050
@@ -56,7 +56,7 @@ func ReadAppConfig() error {
5656 err = json .Unmarshal (configBytes , Config )
5757 if err != nil {
5858 log .Err ("[CONFIG] unmarshal app config failed: %v" , err )
59- } else if Config .Version < DefaultappConfig .Version {
59+ } else if Config .Version < DefaultAppConfig .Version {
6060 log .Warn ("[CONFIG] app config version is too old, new config will be generated" )
6161 // Backup old config
6262 err = os .WriteFile (res .AppConfigPath + ".bak" , configBytes , 0644 )
@@ -65,7 +65,7 @@ func ReadAppConfig() error {
6565 return err
6666 }
6767 // Generate new config
68- configBytes , err := json .MarshalIndent (DefaultappConfig , "" , "\t " )
68+ configBytes , err := json .MarshalIndent (DefaultAppConfig , "" , "\t " )
6969 if err != nil {
7070 panic (err )
7171 }
@@ -121,7 +121,7 @@ var (
121121 "action" : "send_group_msg" ,
122122 "params" : map [string ]interface {}{
123123 "group_id" : 123456789 ,
124- "message" : "ServerBox Notification \n {{kvs}}" ,
124+ "message" : "Server1 \n " + res . PushFormatLocator ,
125125 },
126126 }
127127 defaultWekhookBodyBytes , _ = json .Marshal (defaultWebhookBody )
@@ -138,7 +138,7 @@ var (
138138 }
139139 defaultWebhookIfaceBytes , _ = json .Marshal (defaultWebhookIface )
140140
141- DefaultappConfig = & AppConfig {
141+ DefaultAppConfig = & AppConfig {
142142 Version : 2 ,
143143 Interval : "7s" ,
144144 Rate : "1/1m" ,
0 commit comments