(mixi-post-message-key-regexp): Follow the change of mixi.
authorbg66 <bg66>
Sun, 30 Aug 2009 01:22:23 +0000 (01:22 +0000)
committerbg66 <bg66>
Sun, 30 Aug 2009 01:22:23 +0000 (01:22 +0000)
(mixi-post-message-succeed-regexp): Ditto.
(mixi-post-message): Ditto.

ChangeLog
mixi.el

index 33b1a91..8c533b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-30  OHASHI Akira  <bg66@koka-in.org>
+
+       * mixi.el (mixi-post-message-key-regexp): Follow the change of mixi.
+       (mixi-post-message-succeed-regexp): Ditto.
+       (mixi-post-message): Ditto.
+
 2009-07-13  KAMO Tomoyuki  <kto2038@yahoo.co.jp>
 
        * mixi.el (mixi-message-content-regexp): Follow the change of mixi.
diff --git a/mixi.el b/mixi.el
index 1eba2b7..e89eb47 100644 (file)
--- a/mixi.el
+++ b/mixi.el
   (autoload 'w3m-retrieve "w3m")
   (autoload 'url-retrieve-synchronously "url"))
 
-(defconst mixi-revision "$Revision: 1.207 $")
+(defconst mixi-revision "$Revision: 1.208 $")
 
 (defgroup mixi nil
   "API library for accessing to mixi."
@@ -2732,14 +2732,16 @@ Increase this value when unexpected error frequently occurs."
                (mixi-make-message (nth 0 item) (nth 1 item)))
              items))))
 
-(defmacro mixi-post-message-page (friend)
-  `(concat "/send_message.pl?id=" (mixi-friend-id friend)))
+(defmacro mixi-post-message-page (&optional friend)
+  `(concat "/send_message.pl"
+          (when ,friend
+            (concat "?id=" (mixi-friend-id ,friend)))))
 
 (defconst mixi-post-message-key-regexp
-  "<input name=post_key type=hidden value=\\([a-z0-9]+\\)>")
+  "<input name=\"?post_key\"? type=\"?hidden\"? value=\"?\\([a-z0-9]+\\)\"? ")
 
 (defconst mixi-post-message-succeed-regexp
-  "<b>Á÷¿®´°Î»</b>¤·¤Þ¤·¤¿¡£")
+  "Á÷¿®¤¬´°Î»¤·¤Þ¤·¤¿¡£")
 
 ;;;###autoload
 (defun mixi-post-message (friend title content)
@@ -2758,12 +2760,16 @@ Increase this value when unexpected error frequently occurs."
       (if (re-search-forward mixi-post-message-key-regexp nil t)
          (setq post-key (match-string 1))
        (mixi-post-error 'cannot-find-key friend)))
-    (setq fields `(("post_key" . ,post-key)
+    (setq fields `(("from_show_friend" . "")
+                  ("mode" . "commit_or_edit")
                   ("subject" . ,title)
                   ("body" . ,(mixi-replace-tab-and-space-to-nbsp content))
-                  ("yes" . "¡¡Á÷¡¡¿®¡¡")
-                  ("submit" . "confirm")))
-    (with-mixi-post-form (mixi-post-message-page friend) fields
+                  ("post_key" . ,post-key)
+                  ("id" . ,(mixi-friend-id friend))
+                  ("original_message_id" . "")
+                  ("reply_message_id" . "")
+                  ("yes" . "Á÷¿®¤¹¤ë")))
+    (with-mixi-post-form (mixi-post-message-page) fields
       (unless (re-search-forward mixi-post-message-succeed-regexp nil t)
        (mixi-post-error 'cannot-find-succeed friend)))))