From 775bf69f1811043be545fd6a399f7283ba479ad7 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 24 Mar 2004 15:22:06 +0000 Subject: [PATCH] * riece-unread.el (riece-unread-after-display-message-function): Treat private messages as unread. --- lisp/ChangeLog | 5 +++++ lisp/riece-unread.el | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ffbe8df..e08df94 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-03-24 Daiki Ueno + + * riece-unread.el (riece-unread-after-display-message-function): + Treat private messages as unread. + 2004-03-21 Daiki Ueno * riece.el (riece-exit): Don't clear riece-user-list-buffer and diff --git a/lisp/riece-unread.el b/lisp/riece-unread.el index 6f64b2e..3514358 100644 --- a/lisp/riece-unread.el +++ b/lisp/riece-unread.el @@ -61,15 +61,15 @@ (defvar riece-unread-channels nil) (defun riece-unread-after-display-message-function (message) - (unless (or (riece-message-own-p message) - (riece-message-type message) - (riece-identity-equal (riece-message-target message) - riece-current-channel) - (riece-identity-member (riece-message-target message) - riece-unread-channels)) - (setq riece-unread-channels - (cons (riece-message-target message) riece-unread-channels)) - (riece-emit-signal 'channel-list-changed))) + (let ((target (if (riece-message-private-p message) + (riece-message-speaker message) + (riece-message-target message)))) + (unless (or (riece-message-own-p message) + (riece-message-type message) + (riece-identity-equal target riece-current-channel) + (riece-identity-member target riece-unread-channels)) + (setq riece-unread-channels (cons target riece-unread-channels)) + (riece-emit-signal 'channel-list-changed)))) (defun riece-unread-after-switch-to-channel-function (last) (setq riece-unread-channels -- 1.7.10.4