Skip to content

Commit

Permalink
Merge pull request #12542 from nextcloud/fix/noid/invites
Browse files Browse the repository at this point in the history
fix(federation): update counter after invites store update
  • Loading branch information
Antreesy authored Jun 19, 2024
2 parents c6071c3 + 82450e5 commit e5d6c47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/stores/__tests__/federation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ describe('federationStore', () => {
expect(rejectShare).toHaveBeenCalledWith(invites[0].id)
expect(federationStore.pendingShares).toStrictEqual({})
expect(federationStore.acceptedShares).toMatchObject({ [invites[1].id]: invites[1] })
expect(federationStore.pendingSharesCount).toBe(1)
expect(federationStore.pendingSharesCount).toBe(0)
})

it('skip already rejected invitations', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/stores/federation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export const useFederationStore = defineStore('federation', {
try {
Vue.set(this.pendingShares[id], 'loading', 'reject')
await rejectShare(id)
this.updatePendingSharesCount(Object.keys(this.pendingShares).length)
Vue.delete(this.pendingShares, id)
this.updatePendingSharesCount(Object.keys(this.pendingShares).length)
} catch (error) {
console.error(error)
showError(t('spreed', 'An error occurred while rejecting an invitation'))
Expand Down

0 comments on commit e5d6c47

Please sign in to comment.