File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -894,14 +894,21 @@ class CardDAVStorage(DAVStorage):
894
894
item_mimetype = "text/vcard"
895
895
discovery_class = CardDiscover
896
896
897
- get_multi_template = """<?xml version="1.0" encoding="utf-8" ?>
897
+ def __init__ (self , * args , use_vcard_4 = False , ** kwargs ):
898
+ self .use_vcard_4 = use_vcard_4
899
+ super ().__init__ (* args , ** kwargs )
900
+
901
+ @property
902
+ def get_multi_template (self ):
903
+ ct = 'Content-Type="text/vcard" version="4.0"' if self .use_vcard_4 else ""
904
+ return f"""<?xml version="1.0" encoding="utf-8" ?>
898
905
<C:addressbook-multiget xmlns="DAV:"
899
906
xmlns:C="urn:ietf:params:xml:ns:carddav">
900
907
<prop>
901
908
<getetag/>
902
- <C:address-data/>
909
+ <C:address-data { ct } />
903
910
</prop>
904
- {hrefs}
911
+ {{ hrefs} }
905
912
</C:addressbook-multiget>"""
906
913
907
914
get_multi_data_query = "{urn:ietf:params:xml:ns:carddav}address-data"
You can’t perform that action at this time.
0 commit comments