The --message
/ -m
flag is not correctly setting the message field of notifications. No matter what is specified, the message field is always the string "Done!".
noti -t "My Title" -m "My Message"
This behaviour occurs when the configuration file is missing. An empty file resolves it, as pointed out by @heidark.
The message field of notification popups / voice readouts to be "My Message".
The message fields remains the default string "Done!".
3.0.0
, installed via Homebrew on MacOs 10.13.2
Hm, strange. I can't seem to repro. Can you share the output of this command?
noti --verbose -t "My Title" -m "My Message"
Sure Thing:
$ noti --verbose -t "My Title" -m "My Message"
Failed to configure: failed to read config file: [open .noti.yaml: no such file or directory open /Users/tkc/.config/noti/noti.yaml: no such file or directory]
title: My Title
Running command: []
Services: map[banner:{}]
Viper: map[title:My Title say:map[voice:Alex] pushbullet:map[accesstoken:] bearychat:map[incominghookuri:] message:Done! simplepush:map[key: event:] slack:map[channel: username:noti token:] hipchat:map[room: accesstoken:] defaults:[banner] espeak:map[voicename:english-us] pushover:map[apitoken: userkey:] nsuser:map[soundnamefail:Basso soundname:Ping] pushsafer:map[key:] speechsynthesizer:map[voice:Microsoft David Desktop]]
1 notifications queued
Sent: *nsuser.Notification
If there is no .noti.yaml in the folder you are in when you run noti, it ignores the message flag.
creating a empty .noti.yaml file fixes the problem but only for that given directory.
the issue might here:
https://github.com/variadico/noti/blob/960a214d7f2b2ef4866ac8f90048b65032c7c9bf/internal/command/config.go#L182-L192
Creating an empty file ~/.config/noti/noti.yaml
worked, thank you kindly @heidark.
Ooooh, nice! I can definitely reproduce this now! Thanks @heidark! Patch release will be coming soon!
Thanks everyone!
I believe this should be fixed on latest dev.
Closing now. Patch release will be coming soon!
Most helpful comment
If there is no .noti.yaml in the folder you are in when you run noti, it ignores the message flag.
creating a empty .noti.yaml file fixes the problem but only for that given directory.
the issue might here:
https://github.com/variadico/noti/blob/960a214d7f2b2ef4866ac8f90048b65032c7c9bf/internal/command/config.go#L182-L192