don't show read messages in chat notifications

This patch prevent showing already read messages in chat notifications
which was happening in certain cases. This is fixed in several
different ways depending on which notification daemon is being used
on the system.

In the case of notify-osd, even though it supports appending
notifications, we try to update the previous notification, but only
with unread messages. The issue with appending is that notify-osd
does not respond to trying to close notifications, which means messages
which have been marked as read already will continue to be displayed.

In the case of the notification daemons which don't support appending,
we simply replace the old msg text. This prevents many notifications
from the same person from building up; the new messages are also
displayed immediately instead of waiting for the notification timeout.
We also don't try to display multiple unread messages because these
daemons don't usually support multi-line message bodies.

Change-Id: Ibbd5adbdd5eb4bafadb517ac39064eaecd74228e
Tuleap: #426
1 file changed