aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Activity
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-11 13:44:57 +0100
committerJoas Schilling <coding@schilljs.com>2016-11-16 09:25:46 +0100
commit6047493b6dba2a402f256d2286008c3baaa3d5f9 (patch)
tree4d5d0e696f6c8b84c38add56a5c79f0a674037b7 /lib/private/Activity
parentb5f1296d1ff978e29eb41400ece13096ab636263 (diff)
downloadnextcloud-server-6047493b6dba2a402f256d2286008c3baaa3d5f9.tar.gz
nextcloud-server-6047493b6dba2a402f256d2286008c3baaa3d5f9.zip
Fix integration tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Activity')
-rw-r--r--lib/private/Activity/Event.php5
-rw-r--r--lib/private/Activity/Manager.php12
2 files changed, 6 insertions, 11 deletions
diff --git a/lib/private/Activity/Event.php b/lib/private/Activity/Event.php
index c53335a316f..16c65c20853 100644
--- a/lib/private/Activity/Event.php
+++ b/lib/private/Activity/Event.php
@@ -539,10 +539,13 @@ class Event implements IEvent {
$this->getAffectedUser() !== ''
&&
$this->getTimestamp() !== 0
+ /**
+ * Disabled for BC with old activities
&&
$this->getObjectType() !== ''
&&
- $this->getObjectId() !== ''
+ $this->getObjectId() !== 0
+ */
;
}
}
diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php
index 35668a267ee..9c1629d79c2 100644
--- a/lib/private/Activity/Manager.php
+++ b/lib/private/Activity/Manager.php
@@ -173,14 +173,6 @@ class Manager implements IManager {
* @throws \BadMethodCallException if required values have not been set
*/
public function publish(IEvent $event) {
- $this->publishToConsumers($event, false);
- }
-
- /**
- * @param IEvent $event
- * @param bool $legacyActivity
- */
- protected function publishToConsumers(IEvent $event, $legacyActivity) {
if ($event->getAuthor() === '') {
if ($this->session->getUser() instanceof IUser) {
$event->setAuthor($this->session->getUser()->getUID());
@@ -191,7 +183,7 @@ class Manager implements IManager {
$event->setTimestamp(time());
}
- if (!$legacyActivity && !$event->isValid()) {
+ if (!$event->isValid()) {
throw new \BadMethodCallException('The given event is invalid');
}
@@ -222,7 +214,7 @@ class Manager implements IManager {
->setObject('', 0, $file)
->setLink($link);
- $this->publishToConsumers($event, true);
+ $this->publish($event);
}
/**