* sb-mixi.el (shimbun-comment-article): Simplify.
authorbg66 <bg66>
Wed, 22 Nov 2006 05:14:04 +0000 (05:14 +0000)
committerbg66 <bg66>
Wed, 22 Nov 2006 05:14:04 +0000 (05:14 +0000)
ChangeLog
sb-mixi.el

index 8c71c27..99982f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-11-22  OHASHI Akira  <bg66@koka-in.org>
+
+       * sb-mixi.el (shimbun-comment-article): Simplify.
+
 2006-11-22  KAMO Tomoyuki  <kto2038@yahoo.co.jp>
 
        * mixi.el (mixi-get-matched-items): Fix the condition for quitting
index 6c6e3c7..5ca6bcd 100644 (file)
@@ -172,19 +172,14 @@ FUNCTION is the function for getting articles."
 (defun shimbun-comment-article (url header)
   (let ((parent (mixi-make-object-from-url url))
        (date (shimbun-header-date header))
-       (from (shimbun-header-from header)))
+       (message-id (shimbun-header-id header)))
     (catch 'found
       (mapc (lambda (comment)
-             (let ((nick (mixi-friend-nick (mixi-comment-owner comment)))
-                   (time (shimbun-mixi-make-date comment))
-                   nick2)
-               ;; FIXME: How tricky it is.
-               (when (string-match "\\(.+\\)¤µ¤ó$" nick)
-                 (setq nick2 (match-string 1 nick)))
-               (when (and
-                      (or (string= (shimbun-mime-encode-string nick) from)
-                          (string= (shimbun-mime-encode-string nick2) from))
-                      (string= time date))
+             (let ((id (mixi-friend-id (mixi-comment-owner comment)))
+                   (time (shimbun-mixi-make-date comment)))
+               (when (and (string= time date)
+                          (string-match (concat "^<[0-9]+\\." id "@")
+                                        message-id))
                  ;; FIXME: Concat parent's information?
                  (throw 'found (mixi-comment-content comment)))))
            ;; FIXME: Limit range?