Skip to content

GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.

feat: allow to change os name (#27)

Aldino Kemal3de68df5086d
diff --git a/readme.md b/readme.md
index 1192b5d5..25663bcb 100644
--- a/readme.md
+++ b/readme.md
@@ -6,6 +6,8 @@
- Send whatsapp via http API, [docs/openapi.yml](./docs/openapi.yaml) for more details
- Compress image before send
- Compress video before send
+- Change OS name become your app (this is the app name when connect via mobile)
+ - `--os=Chrome` or `--os=MyApplication`
- Basic Auth
- `--basic-auth=kemal:secret`, or you can simplify
- `-b=kemal:secret`
@@ -15,7 +17,9 @@
- Auto reply message
- `--autoreply="Don't reply this message"`
- Webhook for received message
- - `--webhook="http://yourwebhook.site/handler"`
+ - `--webhook="http://yourwebhook.site/handler"`, or you can simplify
+ - `-w="http://yourwebhook.site/handler"`
+- For more command `./main --help`
### Required (without docker)
diff --git a/src/cmd/root.go b/src/cmd/root.go
index 3f4c7676..1a6ba6b9 100644
--- a/src/cmd/root.go
+++ b/src/cmd/root.go
@@ -35,6 +35,7 @@ func init() {
rootCmd.CompletionOptions.DisableDefaultCmd = true
rootCmd.PersistentFlags().StringVarP(&config.AppPort, "port", "p", config.AppPort, "change port number with --port <number> | example: --port=8080")
rootCmd.PersistentFlags().BoolVarP(&config.AppDebug, "debug", "d", config.AppDebug, "hide or displaying log with --debug <true/false> | example: --debug=true")
+ rootCmd.PersistentFlags().StringVarP(&config.AppOs, "os", "", config.AppOs, `os name --os <string> | example: --os="Chrome"`)
rootCmd.PersistentFlags().StringVarP(&config.AppBasicAuthCredential, "basic-auth", "b", config.AppBasicAuthCredential, "basic auth credential | yourUsername:yourPassword")
rootCmd.PersistentFlags().StringVarP(&config.WhatsappAutoReplyMessage, "autoreply", "", config.WhatsappAutoReplyMessage, `auto reply when received message --autoreply <string> | example: --autoreply="Don't reply this message"`)
rootCmd.PersistentFlags().StringVarP(&config.WhatsappAutoReplyWebhook, "webhook", "w", config.WhatsappAutoReplyMessage, `auto reply when received message --webhook <string> | example: --webhook="https://yourcallback.com/callback"`)