Don't emit NotificationClosed signal on redisplayed notifications

The signal_notification_closed function is called even when a
notification has been pulled from history and re-emits the
NotificationClosed signal, this can confuse clients since multiple such
signals are not accounted for in the spec.
This commit is contained in:
Nikos Tsipinakis 2017-12-06 16:46:08 +02:00
parent ff6f3e496c
commit 0c8d3a4084

View File

@ -205,6 +205,8 @@ int queues_notification_close_id(int id, enum reason reason)
} }
if (target) { if (target) {
//Don't notify clients if notification was pulled from history
if (!target->redisplayed)
signal_notification_closed(target, reason); signal_notification_closed(target, reason);
queues_history_push(target); queues_history_push(target);
} }