From e6f787868567cc609fb831ad05c27f632d3f5ffe Mon Sep 17 00:00:00 2001 From: mguessan Date: Fri, 23 Jul 2010 15:56:37 +0000 Subject: [PATCH] Carddav: use email1 as default email on update git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1257 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ExchangeSession.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index b964bf96..2ea29640 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -2798,17 +2798,15 @@ public abstract class ExchangeSession { convertContactProperties(properties, VCARD_ADR_OTHER_PROPERTIES, property.getValues()); } } else if ("EMAIL".equals(property.getKey())) { - if (property.hasParam("TYPE", "work")) { - properties.put("email1", property.getValue()); - properties.put("smtpemail1", property.getValue()); - } if (property.hasParam("TYPE", "home")) { properties.put("email2", property.getValue()); properties.put("smtpemail2", property.getValue()); - } - if (property.hasParam("TYPE", "other")) { + } else if (property.hasParam("TYPE", "other")) { properties.put("email3", property.getValue()); properties.put("smtpemail3", property.getValue()); + } else { + properties.put("email1", property.getValue()); + properties.put("smtpemail1", property.getValue()); } } else if ("ORG".equals(property.getKey())) { convertContactProperties(properties, VCARD_ORG_PROPERTIES, property.getValues());