[CalendarServer-changes] [14414] CalendarServer/trunk/txdav/carddav/datastore/sql.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 13 22:04:32 PST 2015
Revision: 14414
http://trac.calendarserver.org//changeset/14414
Author: gaya at apple.com
Date: 2015-02-13 22:04:32 -0800 (Fri, 13 Feb 2015)
Log Message:
-----------
in _groupForSharedAddressBookComponent(), use group record name for N and FN vcard properties
Modified Paths:
--------------
CalendarServer/trunk/txdav/carddav/datastore/sql.py
Modified: CalendarServer/trunk/txdav/carddav/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/carddav/datastore/sql.py 2015-02-13 21:29:21 UTC (rev 14413)
+++ CalendarServer/trunk/txdav/carddav/datastore/sql.py 2015-02-14 06:04:32 UTC (rev 14414)
@@ -1003,15 +1003,15 @@
@inlineCallbacks
def _groupForSharedAddressBookComponent(self):
- n = self.viewerHome().uid()
- fn = n
uid = self._groupForSharedAddressBookUID()
+ record = yield self._txn.directoryService().recordWithUID(uid.decode("utf-8"))
+ n = record.shortNames[0]
+ fn = record.fullname if (
+ hasattr(record, "fullName") and record.fullname
+ ) else (
+ n
+ )
- # storebridge should substitute principal name and full name
- # owner = yield CalDAVResource.principalForUID(self.ownerHome().uid())
- # n = owner.name()
- # fn = owner.displayName()
-
component = VCard.fromString(
"""BEGIN:VCARD
VERSION:3.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150213/156a6daa/attachment.html>
More information about the calendarserver-changes
mailing list