* sb-mixi.el (shimbun-mixi-post-mail-wrapper): New function.
authorbg66 <bg66>
Thu, 28 Dec 2006 07:01:56 +0000 (07:01 +0000)
committerbg66 <bg66>
Thu, 28 Dec 2006 07:01:56 +0000 (07:01 +0000)
ChangeLog
sb-mixi.el

index 59187f7..934eca4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-12-28  OHASHI Akira  <bg66@koka-in.org>
 
+       * sb-mixi.el (shimbun-mixi-post-mail-wrapper): New function.
+
+2006-12-28  OHASHI Akira  <bg66@koka-in.org>
+
        * sb-mixi.el (shimbun-mixi-message-id-suffix): New constant.
        (shimbun-mixi-make-message-id): Use it and change return value.
        (shimbun-mixi-make-object-from-message-id): New function.
index 3f9a945..e2b07e9 100644 (file)
@@ -313,6 +313,22 @@ The others:
              parts))
       (or comment parent object))))
 
+(defun shimbun-mixi-post-mail-wrapper (in-reply-to title content)
+  (let ((object (shimbun-mixi-make-object-from-message-id in-reply-to)))
+    (when (mixi-object-p object)
+      (let ((class (mixi-object-class object)))
+       (cond ((eq class 'mixi-comment)
+              (let ((parent (mixi-comment-parent object)))
+                (mixi-post-comment parent content)))
+             ((or (eq class 'mixi-diary) (mixi-bbs-p object))
+              (mixi-post-comment object content))
+             ((eq class 'mixi-community)
+              (mixi-post-topic object title content))
+             ((eq object (mixi-make-me))
+              (mixi-post-diary title content))
+             ((or (eq class 'mixi-friend) (eq class 'mixi-log))
+              (mixi-post-message title content)))))))
+
 (provide 'sb-mixi)
 
 ;;; sb-mixi.el ends here