From 6bd887537509fa9fccd0781ecde38e3faba993de Mon Sep 17 00:00:00 2001 From: zhzy0077 Date: Mon, 21 Aug 2023 11:51:48 +0800 Subject: [PATCH] fix typo and update docs --- cmd/serve.go | 4 ++-- docs/config.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/serve.go b/cmd/serve.go index febaf52f..ef56f97b 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -190,7 +190,7 @@ func execServe(c *cli.Context) error { metricsListenHTTP := c.String("metrics-listen-http") enableMetrics := c.Bool("enable-metrics") || metricsListenHTTP != "" profileListenHTTP := c.String("profile-listen-http") - mesasgeLimit := c.Int("message-limit") + messasgeLimit := c.Int("message-limit") // Check values if firebaseKeyFile != "" && !util.FileExists(firebaseKeyFile) { @@ -366,7 +366,7 @@ func execServe(c *cli.Context) error { conf.WebPushFile = webPushFile conf.WebPushEmailAddress = webPushEmailAddress conf.WebPushStartupQueries = webPushStartupQueries - conf.MessageLimit = mesasgeLimit + conf.MessageLimit = messasgeLimit // Set up hot-reloading of config go sigHandlerConfigReload(config) diff --git a/docs/config.md b/docs/config.md index 9af79992..0f33ec3d 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1341,6 +1341,7 @@ variable before running the `ntfy` command (e.g. `export NTFY_LISTEN_HTTP=:80`). | `web-push-file` | `NTFY_WEB_PUSH_FILE` | *string* | - | Web Push: Database file that stores subscriptions | | `web-push-email-address` | `NTFY_WEB_PUSH_EMAIL_ADDRESS` | *string* | - | Web Push: Sender email address | | `web-push-startup-queries` | `NTFY_WEB_PUSH_STARTUP_QUERIES` | *string* | - | Web Push: SQL queries to run against subscription database at startup | +| `message-limit` | `NTFY_MESSAGE_LIMIT` | *number* | - | The size limit (in bytes) for the ntfy message. NOTE: FCM has size limit at 4000 bytes. APNS has size limit at 4KB. If you increases this size limit, FCM and APNS will NOT work for large messages. | The format for a *duration* is: `(smh)`, e.g. 30s, 20m or 1h. The format for a *size* is: `(GMK)`, e.g. 1G, 200M or 4000k.