mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 19:22:22 -05:00
Carddav: fix regression on VCARD photo detection
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1203 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
f729eb27e5
commit
8bd80ecb8e
@ -1730,7 +1730,7 @@ public abstract class ExchangeSession {
|
||||
|
||||
writer.appendProperty("REV", get("lastmodified"));
|
||||
|
||||
if ("1".equals(get("haspicture"))) {
|
||||
if ("true".equals(get("haspicture"))) {
|
||||
try {
|
||||
ContactPhoto contactPhoto = getContactPhoto(this);
|
||||
writer.appendProperty("PHOTO;TYPE=\"" + contactPhoto.contentType + "\";ENCODING=\"b\"", contactPhoto.content);
|
||||
|
@ -304,4 +304,13 @@ public class TestExchangeSessionContact extends AbstractExchangeSessionTestCase
|
||||
}
|
||||
}
|
||||
|
||||
public void testSearchPublicContactsWithPicture() throws IOException {
|
||||
String folderPath = Settings.getProperty("davmail.publicContactFolder");
|
||||
List<ExchangeSession.Contact> contacts = session.searchContacts(folderPath, ExchangeSession.CONTACT_ATTRIBUTES, session.isTrue("haspicture"));
|
||||
int count = 0;
|
||||
for (ExchangeSession.Contact contact : contacts) {
|
||||
System.out.println("Contact "+(++count)+ '/' +contacts.size()+contact.getBody());
|
||||
assertNotNull(session.getContactPhoto(contact));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user