From 9a3d3c2de9f4fa4abe4639a49f4c6a1ad3179b9d Mon Sep 17 00:00:00 2001 From: mguessan Date: Mon, 3 Aug 2009 23:04:11 +0000 Subject: [PATCH] Caldav: Improve principal -> actualPrincipal detection: use session alias instead of login git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@642 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/caldav/CaldavConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/davmail/caldav/CaldavConnection.java b/src/java/davmail/caldav/CaldavConnection.java index c80f4561..76439412 100644 --- a/src/java/davmail/caldav/CaldavConnection.java +++ b/src/java/davmail/caldav/CaldavConnection.java @@ -686,7 +686,7 @@ public class CaldavConnection extends AbstractConnection { public void sendPrincipal(CaldavRequest request, String prefix, String principal) throws IOException { // actual principal is email address String actualPrincipal = principal; - if ("users".equals(prefix) && userName.equals(principal)) { + if ("users".equals(prefix) && session.getAlias().equalsIgnoreCase(principal)) { actualPrincipal = session.getEmail(); }