* mixi-utils.el (mixi-make-content): Fix for closed users.
authorbg66 <bg66>
Fri, 28 Sep 2007 03:08:49 +0000 (03:08 +0000)
committerbg66 <bg66>
Fri, 28 Sep 2007 03:08:49 +0000 (03:08 +0000)
* sb-mixi.el (shimbun-mixi-get-profile-with-diary): New user option.
(shimbun-mixi-get-headers): Use it.

ChangeLog
mixi-utils.el
sb-mixi.el

index 3b87fea..377da6b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-28  OHASHI Akira  <bg66@koka-in.org>
+
+       * mixi-utils.el (mixi-make-content): Fix for closed users.
+
+       * sb-mixi.el (shimbun-mixi-get-profile-with-diary): New user option.
+       (shimbun-mixi-get-headers): Use it.
+
 2007-09-27  OHASHI Akira  <bg66@koka-in.org>
 
        * mixi.el (mixi-url-retrieve): Add a URL to error messages.
index 82b996b..34a1f07 100644 (file)
          ((eq class 'mixi-friend)
           (if (mixi-object-realized-p object)
               (let ((sex (if (eq (mixi-friend-sex object) 'male) "ÃË" "½÷"))
-                    (age (number-to-string (mixi-friend-age object)))
-                    (birthday
-                     (concat (mapconcat (lambda (number)
-                                          (number-to-string number))
-                                        (mixi-friend-birthday object) "·î")
-                             "Æü"))
+                    (age (if (numberp (mixi-friend-age object))
+                             (number-to-string (mixi-friend-age object))
+                           "??"))
+                    (birthday (if (mixi-friend-birthday object)
+                                  (concat
+                                   (mapconcat (lambda (number)
+                                                (number-to-string number))
+                                              (mixi-friend-birthday object)
+                                              "·î") "Æü")
+                                "??·î??Æü"))
                     (blood-type (symbol-name
                                  (mixi-friend-blood-type object)))
                     (hobby (mapconcat 'identity
index 1c2873b..3d6f744 100644 (file)
@@ -118,6 +118,11 @@ of mixi object."
                              (const :tag "Logs" mixi-get-logs)
                              (function :tag "Other function")))))
 
+(defcustom shimbun-mixi-get-profile-with-diary t
+  "*If non-nil, get his/her profile together with diaries."
+  :group 'shimbun
+  :type 'boolean)
+
 ;; FIXME: Don't use this user option.
 (defcustom shimbun-mixi-page-articles 10
   "*How many articles are there in one page."
@@ -154,6 +159,11 @@ of mixi object."
     (catch 'stop
       (while objects
        (let ((object (car objects)))
+         (when (and shimbun-mixi-get-profile-with-diary
+                    (mixi-diary-p object))
+           (let ((owner (mixi-diary-owner object)))
+             (unless (mixi-object-realized-p owner)
+               (mixi-realize-friend owner))))
          (when (mixi-parent-p object)
            (let* ((comments (mixi-get-comments object range))
                   (comment-headers (shimbun-mixi-get-headers shimbun