From 143ff6a622a3349a01dd0347d069f824b0f24c4c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 23 Oct 2017 12:35:55 +0200 Subject: [PATCH] Add a doc why this should not be removed Signed-off-by: Joas Schilling --- apps/comments/lib/Activity/Provider.php | 6 ++++++ apps/dav/lib/CalDAV/Activity/Provider/Calendar.php | 6 +++++- apps/dav/lib/CalDAV/Activity/Provider/Event.php | 6 +++++- apps/dav/lib/CalDAV/Activity/Provider/Todo.php | 6 +++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php index a691d7dd64..41ab8ea8b8 100644 --- a/apps/comments/lib/Activity/Provider.php +++ b/apps/comments/lib/Activity/Provider.php @@ -174,6 +174,12 @@ class Provider implements IProvider { } // Fix subjects from 12.0.3 and older + // + // Do NOT Remove unless necessary + // Removing this will break parsing of activities that were created on + // Nextcloud 12, so we should keep this as long as it's acceptable. + // Otherwise if people upgrade over multiple releases in a short period, + // they will get the dead entries in their stream. return [ 'actor' => $subjectParameters[0], 'fileId' => (int) $event->getObjectId(), diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php index 1efdbb13b8..fb4a0ff45a 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php @@ -201,7 +201,11 @@ class Calendar extends Base { } } - // Legacy + // Legacy - Do NOT Remove unless necessary + // Removing this will break parsing of activities that were created on + // Nextcloud 12, so we should keep this as long as it's acceptable. + // Otherwise if people upgrade over multiple releases in a short period, + // they will get the dead entries in their stream. switch ($subject) { case self::SUBJECT_ADD: case self::SUBJECT_ADD . '_self': diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php index dafd2404d2..7b515d78b1 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php @@ -139,7 +139,11 @@ class Event extends Base { } } - // Legacy + // Legacy - Do NOT Remove unless necessary + // Removing this will break parsing of activities that were created on + // Nextcloud 12, so we should keep this as long as it's acceptable. + // Otherwise if people upgrade over multiple releases in a short period, + // they will get the dead entries in their stream. switch ($subject) { case self::SUBJECT_OBJECT_ADD . '_event': case self::SUBJECT_OBJECT_DELETE . '_event': diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php index 0f9cd64053..20d7afef02 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php @@ -112,7 +112,11 @@ class Todo extends Event { } } - // Legacy + // Legacy - Do NOT Remove unless necessary + // Removing this will break parsing of activities that were created on + // Nextcloud 12, so we should keep this as long as it's acceptable. + // Otherwise if people upgrade over multiple releases in a short period, + // they will get the dead entries in their stream. switch ($subject) { case self::SUBJECT_OBJECT_ADD . '_todo': case self::SUBJECT_OBJECT_DELETE . '_todo':