Skip to content

Commit

Permalink
Merge pull request #5302 from nextcloud/fix/404-on-mention
Browse files Browse the repository at this point in the history
fix(mention): use new url schema
  • Loading branch information
juliushaertl authored Jan 22, 2024
2 parents 6e0715b + 711258d commit 9a75b21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions cypress/e2e/nodes/Mentions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ describe('Test mentioning users', () => {

return cy.wait(`@${autocompleteReauestAlias}`)
.then(() => {
cy.intercept({ method: 'PUT', url: '**/mention' }).as('putMention')
cy.get('.tippy-box .suggestion-list').contains(mention).click()
cy.get('span.mention').contains(mention).should('be.visible')
cy.wait('@putMention')
.its('response.statusCode').should('eq', 200)
})
})

Expand Down
5 changes: 3 additions & 2 deletions src/components/Suggestion/Mention/suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import createSuggestions from '../suggestions.js'
const USERS_LIST_ENDPOINT_URL = generateUrl('apps/text/api/v1/users')

const emitMention = ({ session, props }) => {
axios.put(generateUrl('apps/text/session/mention'), {
documentId: session.documentId,
const documentId = session.documentId
axios.put(generateUrl(`apps/text/session/${documentId}/mention`), {
documentId,
sessionId: session.id,
sessionToken: session.token,
mention: props.id,
Expand Down

0 comments on commit 9a75b21

Please sign in to comment.