Use the same log file for incoming and outgoing private messages
authorDaiki Ueno <ueno@unixuser.org>
Wed, 26 Jun 2013 08:04:59 +0000 (17:04 +0900)
committerDaiki Ueno <ueno@unixuser.org>
Wed, 26 Jun 2013 08:04:59 +0000 (17:04 +0900)
lisp/ChangeLog
lisp/riece-log.el

index 4e271be..7cf5276 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-26  Daiki Ueno  <ueno@unixuser.org>
+
+       * riece-log.el (riece-log-display-message-function): Use the same
+       log file for incoming and outgoing private messages.
+
 2012-07-31  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-commands.el (riece-command-open-server): Open the default
 2012-07-31  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-commands.el (riece-command-open-server): Open the default
index c525d25..5eabb8b 100644 (file)
@@ -100,8 +100,12 @@ It is created if there is at least one instance of Emacs running riece-log.")
                  (or riece-log-coding-system
                      (car (get-language-info current-language-environment
                                              'coding-system)))))
                  (or riece-log-coding-system
                      (car (get-language-info current-language-environment
                                              'coding-system)))))
-            (file (riece-log-make-file-name (riece-message-target message)
-                                            coding-system-for-write))
+            (file (riece-log-make-file-name
+                   (if (and (riece-message-private-p message)
+                            (not (riece-message-own-p message)))
+                       (riece-message-speaker message)
+                     (riece-message-target message))
+                   coding-system-for-write))
             (file-name-coding-system 'no-conversion))
        (unless (file-directory-p (file-name-directory file))
          (make-directory (file-name-directory file) t))
             (file-name-coding-system 'no-conversion))
        (unless (file-directory-p (file-name-directory file))
          (make-directory (file-name-directory file) t))