mirror of
https://github.com/lennart-k/rustical.git
synced 2026-01-30 16:28:21 +00:00
address_object resource: Implement displayname
This commit is contained in:
@@ -8,6 +8,7 @@ use crate::{
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
use derive_more::derive::{From, Into};
|
use derive_more::derive::{From, Into};
|
||||||
|
use ical::parser::VcardFNProperty;
|
||||||
use rustical_dav::{
|
use rustical_dav::{
|
||||||
extensions::CommonPropertiesExtension,
|
extensions::CommonPropertiesExtension,
|
||||||
privileges::UserPrivilegeSet,
|
privileges::UserPrivilegeSet,
|
||||||
@@ -70,8 +71,11 @@ impl Resource for AddressObjectResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_displayname(&self) -> Option<&str> {
|
fn get_displayname(&self) -> Option<&str> {
|
||||||
todo!()
|
self.object
|
||||||
// self.object.get_full_name()
|
.get_vcard()
|
||||||
|
.full_name
|
||||||
|
.first()
|
||||||
|
.map(|VcardFNProperty(name, _)| name.as_str())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_owner(&self) -> Option<&str> {
|
fn get_owner(&self) -> Option<&str> {
|
||||||
|
|||||||
Reference in New Issue
Block a user