diff options
-rw-r--r-- | .drone.jsonnet | 1 | ||||
-rw-r--r-- | .drone.yml | 27 | ||||
-rw-r--r-- | composer.lock | 8 | ||||
-rw-r--r-- | lib/Chat/ChatManager.php | 2 | ||||
-rw-r--r-- | lib/Manager.php | 3 | ||||
-rw-r--r-- | tests/integration/spreedcheats/lib/Controller/ApiController.php | 10 |
6 files changed, 42 insertions, 9 deletions
diff --git a/.drone.jsonnet b/.drone.jsonnet index 9920a39f5..c4f0b3c98 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -33,6 +33,7 @@ local Pipeline(test_set, database, services) = { ] else [] ) + [ "cd apps/$APP_NAME", + "composer install --no-dev", "cd tests/integration/", "bash run.sh features/"+test_set ] diff --git a/.drone.yml b/.drone.yml index b20111fc0..c97040025 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,6 +15,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/callapi environment: @@ -48,6 +49,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/chat environment: @@ -81,6 +83,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/command environment: @@ -115,6 +118,7 @@ steps: - ./occ app:enable notifications - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/conversation environment: @@ -149,6 +153,7 @@ steps: - ./occ app:enable notifications - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/conversation-2 environment: @@ -182,6 +187,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/federation environment: @@ -215,6 +221,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/reaction environment: @@ -248,6 +255,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/sharing environment: @@ -281,6 +289,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/sharing-2 environment: @@ -328,6 +337,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/callapi environment: @@ -376,6 +386,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/chat environment: @@ -424,6 +435,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/command environment: @@ -473,6 +485,7 @@ steps: - ./occ app:enable notifications - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/conversation environment: @@ -522,6 +535,7 @@ steps: - ./occ app:enable notifications - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/conversation-2 environment: @@ -570,6 +584,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/federation environment: @@ -618,6 +633,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/reaction environment: @@ -666,6 +682,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/sharing environment: @@ -714,6 +731,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/sharing-2 environment: @@ -757,6 +775,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/callapi environment: @@ -799,6 +818,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/chat environment: @@ -841,6 +861,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/command environment: @@ -884,6 +905,7 @@ steps: - ./occ app:enable notifications - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/conversation environment: @@ -927,6 +949,7 @@ steps: - ./occ app:enable notifications - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/conversation-2 environment: @@ -969,6 +992,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/federation environment: @@ -1011,6 +1035,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/reaction environment: @@ -1053,6 +1078,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/sharing environment: @@ -1095,6 +1121,7 @@ steps: apps/notifications - ./occ app:enable notifications - cd apps/$APP_NAME + - composer install --no-dev - cd tests/integration/ - bash run.sh features/sharing-2 environment: diff --git a/composer.lock b/composer.lock index b17f0f07e..e4d9f5db5 100644 --- a/composer.lock +++ b/composer.lock @@ -242,12 +242,12 @@ "source": { "type": "git", "url": "https://github.com/ChristophWurst/nextcloud_composer.git", - "reference": "3bfc852196553be30c20d445a8daf4d4c343642e" + "reference": "6a6fe9467e4427f17b1fade97d6252793fc7a9e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/3bfc852196553be30c20d445a8daf4d4c343642e", - "reference": "3bfc852196553be30c20d445a8daf4d4c343642e", + "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/6a6fe9467e4427f17b1fade97d6252793fc7a9e8", + "reference": "6a6fe9467e4427f17b1fade97d6252793fc7a9e8", "shasum": "" }, "require": { @@ -278,7 +278,7 @@ "issues": "https://github.com/ChristophWurst/nextcloud_composer/issues", "source": "https://github.com/ChristophWurst/nextcloud_composer/tree/master" }, - "time": "2022-06-29T02:19:47+00:00" + "time": "2022-07-06T02:28:38+00:00" }, { "name": "composer/package-versions-deprecated", diff --git a/lib/Chat/ChatManager.php b/lib/Chat/ChatManager.php index de2bdcf66..361046a17 100644 --- a/lib/Chat/ChatManager.php +++ b/lib/Chat/ChatManager.php @@ -712,6 +712,6 @@ class ChatManager { } public function deleteExpiredMessages(int $roomId): void { - $this->commentsManager->deleteMessageExpiredAtObject('chat', (string) $roomId); + $this->commentsManager->deleteCommentsExpiredAtObject('chat', (string) $roomId); } } diff --git a/lib/Manager.php b/lib/Manager.php index 90ce51d63..5acf16c2c 100644 --- a/lib/Manager.php +++ b/lib/Manager.php @@ -222,7 +222,7 @@ class Manager { 'creation_timestamp' => $row['comment_creation_timestamp'], 'latest_child_timestamp' => $row['comment_latest_child_timestamp'], 'reactions' => $row['comment_reactions'], - 'expire_date' => $row['expire_date'], + 'expire_date' => $row['comment_expire_date'], ]); } @@ -1181,5 +1181,6 @@ class Manager { $query->selectAlias('c.creation_timestamp', 'comment_creation_timestamp'); $query->selectAlias('c.latest_child_timestamp', 'comment_latest_child_timestamp'); $query->selectAlias('c.reactions', 'comment_reactions'); + $query->selectAlias('c.expire_date', 'comment_expire_date'); } } diff --git a/tests/integration/spreedcheats/lib/Controller/ApiController.php b/tests/integration/spreedcheats/lib/Controller/ApiController.php index fbaab0cf1..ff4d6c9de 100644 --- a/tests/integration/spreedcheats/lib/Controller/ApiController.php +++ b/tests/integration/spreedcheats/lib/Controller/ApiController.php @@ -121,7 +121,7 @@ class ApiController extends OCSController { ->where( $query->expr()->andX( $query->expr()->eq('class', $query->createNamedParameter(ExpireChatMessages::class)), - $query->expr()->eq('argument', $query->createNamedParameter(json_encode(['room_id' => (int) $roomId]))) + $query->expr()->eq('argument', $query->createNamedParameter(json_encode(['room_id' => $roomId]))) ) ); $result = $query->executeQuery(); @@ -132,12 +132,16 @@ class ApiController extends OCSController { return new DataResponse([], Http::STATUS_NOT_FOUND); } - private function getRoomIdByToken(string $token): ?string { + private function getRoomIdByToken(string $token): ?int { $query = $this->db->getQueryBuilder(); $query->select('id') ->from('talk_rooms') ->where($query->expr()->eq('token', $query->createNamedParameter($token))); + $result = $query->executeQuery(); - return $result->fetchOne(); + $roomId = (int) $result->fetchOne(); + $result->closeCursor(); + + return $roomId; } } |