Describe the bug
Device up/down notification emails don't appear to be sent if the notification queue is enabled.
To Reproduce
Enable the notification queue in settings and force a device up/down event. Wait for a polling cycle and check the notification queue page. The email is listed but stays stuck forever in the "pending" state.
Expected behavior
An email should be sent and the queue status changed to "done".
The problem appears to be in "thold_functions.php" in the function "process_device_notifications" on line 6957:
AND topic NOT IN ('thold_dhost_mail', 'thold_uhost_mail', 'thold_dhost_cmd', 'thold_uhost_cmd')
The NOT seems to be incorrect and should be removed. If you look at the case statements a few lines below it is checking for the topics excluded by that NOT.
Describe the bug Device up/down notification emails don't appear to be sent if the notification queue is enabled.
To Reproduce Enable the notification queue in settings and force a device up/down event. Wait for a polling cycle and check the notification queue page. The email is listed but stays stuck forever in the "pending" state.
Expected behavior An email should be sent and the queue status changed to "done".
The problem appears to be in "thold_functions.php" in the function "process_device_notifications" on line 6957:
AND topic NOT IN ('thold_dhost_mail', 'thold_uhost_mail', 'thold_dhost_cmd', 'thold_uhost_cmd')
The NOT seems to be incorrect and should be removed. If you look at the case statements a few lines below it is checking for the topics excluded by that NOT.
I removed the NOT in my copy and the notification queue now works. This issue appears to have been introduced in commit https://github.com/Cacti/plugin_thold/commit/2ca8a0083c4e2c2dbdc6aae220bb7d6a5d6f1ee0