From: ueno Date: Wed, 24 Mar 2004 15:22:06 +0000 (+0000) Subject: * riece-unread.el (riece-unread-after-display-message-function): X-Git-Tag: riece-0_2_2~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=775bf69f1811043be545fd6a399f7283ba479ad7;p=elisp%2Friece.git * riece-unread.el (riece-unread-after-display-message-function): Treat private messages as unread. --- 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