Browse Source

feat: allow to change os name

pull/27/head
Aldino Kemal 3 years ago
parent
commit
60593329c4
  1. 6
      readme.md
  2. 1
      src/cmd/root.go

6
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)

1
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"`)

Loading…
Cancel
Save