Compare commits

...

9 Commits

Author SHA1 Message Date
grnd-alt
93ec6ce56b Merge pull request #6591 from nextcloud/release/1.6.7
bump version to v1.6.7
2024-12-12 15:29:02 +01:00
grnd-alt
9164944cb1 bump version to v1.6.7
Signed-off-by: grnd-alt <git@belakkaf.net>
2024-12-12 13:50:54 +01:00
Julius Knorr
1443fd24ac Merge pull request #6518 from nextcloud/backport/detect-end-of-activity-stream-stable23
stable23: fix: Detect end of the activity responses (fix #3395)
2024-11-18 22:16:02 +01:00
Julius Härtl
55004b9309 fix: Detect end of the activity responses (fix #3395)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-11-18 11:11:34 +01:00
Arthur Schiwon
1c74fda2c2 Merge pull request #5705 from nextcloud/backport/5703/stable23
[stable23] fix: Avoid conflicts on deck attachments folder name
2024-05-24 22:24:17 +02:00
Luka Trovic
2817d8bb43 ci: update php setup for integration check
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2024-05-24 18:35:56 +02:00
Julius Härtl
f3b704b56d fix: Compatibility with php 7.4
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-03-28 10:16:02 +01:00
Julius Härtl
fd0f37e9d6 ci: Update base query count
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-03-27 15:02:16 +00:00
Julius Härtl
c5d594d602 fix: Avoid conflicts on deck attachments folder name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-03-27 15:02:16 +00:00
9 changed files with 47 additions and 8 deletions

View File

@@ -72,7 +72,7 @@ jobs:
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
tools: phpunit tools: phpunit
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql, extensions: mbstring, gd, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql,
coverage: none coverage: none
- name: Set up PHPUnit - name: Set up PHPUnit

View File

@@ -62,7 +62,7 @@ jobs:
path: apps/${{ env.APP_NAME }} path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }} - name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@2.18.0 uses: shivammathur/setup-php@2.15.0
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
tools: phpunit tools: phpunit

View File

@@ -1,6 +1,13 @@
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 1.6.7
### Fixed
- fix: Detect end of the activity responses (fix #3395) #6518
- fix: Avoid conflicts on deck attachments folder name #5705
## 1.6.6 ## 1.6.6
### Fixed ### Fixed

View File

@@ -16,7 +16,7 @@
- 🚀 Get your project organized - 🚀 Get your project organized
</description> </description>
<version>1.6.6</version> <version>1.6.7</version>
<licence>agpl</licence> <licence>agpl</licence>
<author>Julius Härtl</author> <author>Julius Härtl</author>
<namespace>Deck</namespace> <namespace>Deck</namespace>

View File

@@ -176,4 +176,12 @@ class ConfigService {
return $this->config->getUserValue($userId ?? $this->getUserId(), 'deck', 'attachment_folder', '/Deck'); return $this->config->getUserValue($userId ?? $this->getUserId(), 'deck', 'attachment_folder', '/Deck');
} }
public function setAttachmentFolder(?string $userId = null, string $path): void {
if ($userId === null && $this->getUserId() === null) {
throw new NoPermissionException('Must be logged in get the attachment folder');
}
$this->config->setUserValue($userId ?? $this->getUserId(), 'deck', 'attachment_folder', $path);
}
} }

View File

@@ -31,6 +31,7 @@ use OCA\Deck\Sharing\DeckShareProvider;
use OCA\Deck\StatusException; use OCA\Deck\StatusException;
use OCP\AppFramework\Http\StreamResponse; use OCP\AppFramework\Http\StreamResponse;
use OCP\Constants; use OCP\Constants;
use OCP\Files\Folder;
use OCP\Files\IMimeTypeDetector; use OCP\Files\IMimeTypeDetector;
use OCP\Files\IRootFolder; use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException; use OCP\Files\NotFoundException;
@@ -189,6 +190,16 @@ class FilesAppService implements IAttachmentService, ICustomAttachmentService {
$folder = $userFolder->newFolder($this->configService->getAttachmentFolder()); $folder = $userFolder->newFolder($this->configService->getAttachmentFolder());
} }
if ($folder->isShared()) {
$folderName = $userFolder->getNonExistingName($this->configService->getAttachmentFolder());
$folder = $userFolder->newFolder($folderName);
$this->configService->setAttachmentFolder($this->userId, $folderName);
}
if (!$folder instanceof Folder || $folder->isShared()) {
throw new NotFoundException('No target folder found');
}
$fileName = $folder->getNonExistingName($fileName); $fileName = $folder->getNonExistingName($fileName);
$target = $folder->newFile($fileName); $target = $folder->newFile($fileName);
$content = fopen($file['tmp_name'], 'rb'); $content = fopen($file['tmp_name'], 'rb');

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "deck", "name": "deck",
"version": "1.6.5", "version": "1.6.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {

View File

@@ -1,7 +1,7 @@
{ {
"name": "deck", "name": "deck",
"description": "", "description": "",
"version": "1.6.6", "version": "1.6.7",
"authors": [ "authors": [
{ {
"name": "Julius Härtl", "name": "Julius Härtl",
@@ -97,4 +97,4 @@
"<rootDir>/node_modules/jest-serializer-vue" "<rootDir>/node_modules/jest-serializer-vue"
] ]
} }
} }

View File

@@ -84,7 +84,20 @@ export default {
params.append('object_id', '' + this.objectId) params.append('object_id', '' + this.objectId)
params.append('limit', ACTIVITY_FETCH_LIMIT) params.append('limit', ACTIVITY_FETCH_LIMIT)
const response = await axios.get(generateOcsUrl(`apps/activity/api/v2/activity/${this.filter}`) + '?' + params) const response = await axios.get(
generateOcsUrl(`apps/activity/api/v2/activity/${this.filter}`) + '?' + params,
{
validateStatus: (status) => {
return (status >= 200 && status < 300) || status === 304
},
},
)
if (response.status === 304) {
this.endReached = true
return []
}
let activities = response.data.ocs.data let activities = response.data.ocs.data
if (this.filter === 'deck') { if (this.filter === 'deck') {
// We need to manually filter activities here, since currently we use two different types and there is no way // We need to manually filter activities here, since currently we use two different types and there is no way
@@ -95,7 +108,7 @@ export default {
}) })
} }
this.activities.push(...activities) this.activities.push(...activities)
if (response.data.ocs.meta.statuscode === 304 || activities.length === 0) { if (activities.length === 0) {
this.endReached = true this.endReached = true
return [] return []
} }