mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-31 10:39:23 +02:00
ntfy pub
: use default-user
and default-password
from client.yml
fixes #431
This commit is contained in:
parent
dfec18be3d
commit
85eb9160d8
2 changed files with 7 additions and 1 deletions
cmd
|
@ -160,6 +160,8 @@ func execPublish(c *cli.Context) error {
|
|||
fmt.Fprintf(c.App.ErrWriter, "\r%s\r", strings.Repeat(" ", 20))
|
||||
}
|
||||
options = append(options, client.WithBasicAuth(user, pass))
|
||||
} else if conf.DefaultUser != "" && conf.DefaultPassword != nil {
|
||||
options = append(options, client.WithBasicAuth(conf.DefaultUser, *conf.DefaultPassword))
|
||||
}
|
||||
if pid > 0 {
|
||||
newMessage, err := waitForProcess(pid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue