mirror of
https://github.com/nextcloud/server.git
synced 2026-03-31 06:36:18 -04:00
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
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:
commit
9843a2fa65
9 changed files with 23 additions and 14 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
4
dist/7462-7462.js
vendored
File diff suppressed because one or more lines are too long
2
dist/7462-7462.js.map
vendored
2
dist/7462-7462.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/comments-comments-app.js
vendored
4
dist/comments-comments-app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/comments-comments-app.js.map
vendored
2
dist/comments-comments-app.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/comments-comments-tab.js
vendored
4
dist/comments-comments-tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/comments-comments-tab.js.map
vendored
2
dist/comments-comments-tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue