Merge pull request #55663 from nextcloud/backport/55645/stable32
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Waiting to run
Psalm static code analysis / static-code-analysis-security (push) Waiting to run
Psalm static code analysis / static-code-analysis-ocp (push) Waiting to run
Psalm static code analysis / static-code-analysis-ncu (push) Waiting to run

[stable32] Fix comments when used by other apps
This commit is contained in:
Joas Schilling 2025-10-10 09:47:17 +02:00 committed by GitHub
commit 9843a2fa65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 23 additions and 14 deletions

View file

@ -27,6 +27,10 @@ class CommentersSorter implements ISorter {
* @param array $context
*/
public function sort(array &$sortArray, array $context): void {
if (!isset($context['itemType'], $context['itemId'])) {
return;
}
$commenters = $this->retrieveCommentsInformation($context['itemType'], $context['itemId']);
if (count($commenters) === 0) {
return;

View file

@ -27,6 +27,7 @@ export default defineComponent({
key: 'editor',
},
userData: {},
currentResourceId: this.resourceId,
}
},
methods: {
@ -40,8 +41,8 @@ export default defineComponent({
const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), {
params: {
search,
itemType: 'files',
itemId: this.resourceId,
itemType: this.resourceType,
itemId: this.currentResourceId,
sorter: 'commenters|share-recipients',
limit: loadState('comments', 'maxAutoCompleteResults'),
},

View file

@ -106,7 +106,6 @@ export default {
loading: false,
done: false,
currentResourceId: this.resourceId,
offset: 0,
comments: [],
@ -153,7 +152,7 @@ export default {
async update(resourceId) {
this.currentResourceId = resourceId
this.resetState()
this.getComments()
await this.getComments()
},
/**
@ -201,8 +200,13 @@ export default {
this.done = true
}
// Ensure actor id is a string
for (const comment of comments) {
comment.props.actorId = comment.props.actorId.toString()
}
// Insert results
this.comments.push(...comments)
this.comments = [...this.comments, ...comments]
// Increase offset for next fetch
this.offset += DEFAULT_LIMIT

4
dist/7462-7462.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long