bhopmann / kanboard-plugin-signal

Receive Kanboard notifications on Signal (via signal-cli).
MIT License
4 stars 3 forks source link

Project notifications to a group not working #3

Closed mdino-gh closed 3 years ago

mdino-gh commented 3 years ago

Hello,

I recently installed the Signal plugin from Kanboard plugin menu. I wasn't able to get project notifications to work.

I found the following error message in the daemon log:

signal-cli: error: argument -g/--group: expected one argument

In the error log of the web server the following error message appeared:

2021-04-21 19:46:47: (mod_fastcgi.c.421) FastCGI-stderr: PHP Notice: Undefined variable: user in /var/www/html/kanboard/plugins/Signal/Notification/Signal.php on line 79 2021-04-21 19:46:47: (mod_fastcgi.c.421) FastCGI-stderr: PHP Notice: Trying to access array offset on value of type null in /var/www/html/kanboard/plugins/Signal/Notification/Signal.php on line 79

repeated for lines 80 to 86.

If figured out that in the function notifyProject in Signal.php there seems to be the problem

$this->userMetadataModel->get($user['id']...

instead of

$this->projectMetadataModel->get($project['id']...

The issue seems to be present in both available releases 1.0.0 and 1.0.1, but seems to be fixed in the current repository. So to fix the issue I cloned the repo into a temporary directory, removed all files and directories under kanboard/plugin/Signal directory and copied the files from the cloned repository into the plugin directory. Now notifications to group are working.

I really like this plugin. Good work!

bhopmann commented 3 years ago

Yes, you're right - and I should have made the next version available much earlier. But this now has happened: https://github.com/bhopmann/kanboard-plugin-signal/releases/tag/v1.0.2