diff options
author | Thomas Citharel <tcit@tcit.fr> | 2022-05-18 11:10:36 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2022-05-18 11:17:27 +0200 |
commit | cf8b98bf5f1da01a5992bd88ea4a8ed83e797eba (patch) | |
tree | c3dfee9d88a06a967961949140cd08cd10a8a7ac /apps/dav/lib/CalDAV | |
parent | ebd9efd5843303fe6150db924560c5125ebd439e (diff) | |
download | nextcloud-server-cf8b98bf5f1da01a5992bd88ea4a8ed83e797eba.tar.gz nextcloud-server-cf8b98bf5f1da01a5992bd88ea4a8ed83e797eba.zip |
Make sure activities are not created when a deleted calendar object expires
Closes https://github.com/nextcloud/activity/issues/784
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 3253d41a5cd..8bdc084cd7b 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -1139,7 +1139,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription */ public function getCalendarObject($calendarId, $objectUri, int $calendarType = self::CALENDAR_TYPE_CALENDAR) { $query = $this->db->getQueryBuilder(); - $query->select(['id', 'uri', 'lastmodified', 'etag', 'calendarid', 'size', 'calendardata', 'componenttype', 'classification']) + $query->select(['id', 'uri', 'lastmodified', 'etag', 'calendarid', 'size', 'calendardata', 'componenttype', 'classification', 'deleted_at']) ->from('calendarobjects') ->where($query->expr()->eq('calendarid', $query->createNamedParameter($calendarId))) ->andWhere($query->expr()->eq('uri', $query->createNamedParameter($objectUri))) @@ -1161,7 +1161,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'size' => (int)$row['size'], 'calendardata' => $this->readBlob($row['calendardata']), 'component' => strtolower($row['componenttype']), - 'classification' => (int)$row['classification'] + 'classification' => (int)$row['classification'], + '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}deleted-at' => $row['deleted_at'] === null ? $row['deleted_at'] : (int) $row['deleted_at'], ]; } |