+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.
(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."
(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)
(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)))))