You are not logged in.
I'm currently developing a plugin for GLPI and I'm implementing the notifications. So far so good, I'm registering correctly the events, I'm raising them whenever I need them to and the notification emails get sent though though they dont leave the queue (as intended), the problem comes when I raise the same event 2 times, which should create 2 different notifications/emails but what happens is: the first notification gets overwritten by the second one in the notification queue.
Help is much appreciated, I searched the forum before posting but didn't find anything.
Note: "Prestamo" means "Loan" in english
NotificationTargetPrestamo
<?php
namespace GlpiPlugin\Prestamo;
use NotificationTarget;
if (!defined('GLPI_ROOT')) {
die("Sorry. You can't access directly to this file");
}
// Class NotificationTarget
class NotificationTargetPrestamo extends NotificationTarget {
function getEvents() {
return [
'testprestamonotification' => __('TestNoti NotificationTargetPrestamo.php', 'prestamo'),
'loan_upadate' => __('Actualizar NotificationTargetPrestamo.php', 'prestamo'),
'prestamoTest2' => __('prestamoTest2 NotificationTargetPrestamo.php', 'prestamo'),
'prestamocreado' => __('prestamocreado NotificationTargetPrestamo.php', 'prestamo'),
];
}
//more code...
?>
Offline
I solved it!
I just had to set the variable $deduplicate_queued_notifications to false in my Prestamo class which was extending from CommonDBTM.
Offline