-
|
Hi there, I'm currently trying to implement a webapp with tsdav, which should use the rustical server. The VEVENT and the VTODO seem to work fine so far. But the VCARD does not work. For reference this is the code I use to test this: import { DAVClient } from 'tsdav';
const config = {
// Example:
// serverUrl: 'https://dav.domain.com/caldav-compat',
// username: 'user',
// password: 'secret',
};
const cardClient = new DAVClient({
serverUrl: config.serverUrl,
credentials: { username: config.username, password: config.password },
authMethod: 'Basic',
defaultAccountType: 'carddav',
});
await cardClient.login();
console.log('CardDAV: logged in');
const addressBooks = await cardClient.fetchAddressBooks();
console.log(`Found ${addressBooks.length} address books`);
for (const ab of addressBooks) {
console.log('\n--- AddressBook ---');
console.log('URL:', ab.url);
console.log('Name:', ab.displayName?.toString());
const objects = await cardClient.fetchVCards({ addressBook: ab });
console.log(` objects: ${objects}`);
console.log(` vCards: ${objects.length}`);
}This returns 0 contacts for my only address book: I have over 350 contacts in there. I also see a issue on the radical server: I'm not sure what that error means. Is there an option missing or something? Can you help me fix this? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Hey, seems like I forgot to implement |
Beta Was this translation helpful? Give feedback.

Hey, seems like I forgot to implement
addressbook-queryfrom the CardDAV spec.I've added a first implementation to
v0.11.6and a tracking issue #159. :)