Noti: Message setting doesn't work

Created on 24 Jan 2018  ·  6Comments  ·  Source: variadico/noti

Description

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!".

Steps to reproduce

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.

Expected behavior

The message field of notification popups / voice readouts to be "My Message".

Actual behavior

The message fields remains the default string "Done!".
screen shot 2018-01-24 at 4 17 07 pm

Version

3.0.0, installed via Homebrew on MacOs 10.13.2

screen shot 2018-01-24 at 4 17 13 pm

bug

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

All 6 comments

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

subvillion picture subvillion  ·  6Comments

integrii picture integrii  ·  12Comments

pascalandy picture pascalandy  ·  6Comments

ilovezfs picture ilovezfs  ·  7Comments

ventz picture ventz  ·  5Comments