pimalaya / himalaya

CLI to manage emails
https://pimalaya.org
MIT License
3.17k stars 95 forks source link

Notify and watch seemingly not running commands anymore in 0.6.0 #422

Closed igemnace closed 1 year ago

igemnace commented 2 years ago

I've recently updated to the breaking config changes in 0.6.0, and I've noticed that the notify and watch sub-commands no longer run notify-cmd and watch-cmds, respectively. I notice this because I'm not receiving any notifications, and my mbsync isn't running as expected (I have it hooked up to watch-cmds).

What information is needed from me to help debug? I've tried running himalaya --log-level debug --account <account name> notify but it doesn't log anything to stdout/stderr.

soywod commented 2 years ago

It looks like those commands are really broken since the last release, I will fix them ASAP. I noticed they are not tested, because they are not shared with all backends (they are specific to the IMAP one), it could be a good occasion to add tests in order to avoid such situation in the future.

igemnace commented 2 years ago

Cool, thanks for the confirmation. Is this something you're meant to implement in the CLI or the lib? Just so I can get some direction to try and look at it myself

soywod commented 2 years ago

It should be part of the lib (the ImapBackend).

igemnace commented 1 year ago

Hey @soywod! Happy to report that it's a trivial issue -- it's just a config rename here: https://github.com/soywod/himalaya/commit/a3686c1c44e4a129f8214eb7e323247fa0c2d0fb#diff-acfd6ab7d4ac1e70e4573deeaed73377188170fe8207a3d1cd6806164b0cc6e0R47-R52

Requires imap-notify-query and imap-watch-cmds in the config now after the config refactor. I've inspected the code and everything seems wired up correctly -- it was just that specific breaking change. Might be worth being a little clearer in the CHANGELOG about the rename, but other than that, everything looks good!

soywod commented 1 year ago

Ah yes you right, nice catch! Which makes sense, since those commands are only related to the IMAP backend. I will update the CHANGELOG to make it more clear. Thank you for your help!