Suppress user name in IMAP URL when it is same as current uname.
authorChris Hanson <org/chris-hanson/cph>
Sun, 9 Jul 2000 01:10:51 +0000 (01:10 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 9 Jul 2000 01:10:51 +0000 (01:10 +0000)
v7/src/imail/imail-imap.scm

index 133fd20f16532ef288c4e5237d875eda70585c2d..0c3387700e6556a9a72e1e52cfd38f4275af921d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imail-imap.scm,v 1.139 2000/07/07 01:52:18 cph Exp $
+;;; $Id: imail-imap.scm,v 1.140 2000/07/09 01:10:51 cph Exp $
 ;;;
 ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
 ;;;
 
 (define (make-imap-url-string url mailbox)
   (string-append "//"
-                (url:encode-string (imap-url-user-id url))
-                "@"
+                (let ((user-id (imap-url-user-id url)))
+                  (if (string=? user-id (current-user-name))
+                      ""
+                      (string-append (url:encode-string user-id) "@")))
                 (string-downcase (imap-url-host url))
                 (let ((port (imap-url-port url)))
                   (if (= port 143)