Skip to content

Commit

Permalink
Merge pull request #13629 from nextcloud/fix/noid/download-participan…
Browse files Browse the repository at this point in the history
…ts-capabilities

fix(TopBarMenu): check capabilities for downloading participants in call
  • Loading branch information
DorraJaouad authored Oct 25, 2024
2 parents b1d03f6 + 6d4a49a commit 882f02c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/TopBar/TopBarMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
</template>
{{ t('spreed', 'Conversation settings') }}
</NcActionButton>
<NcActionLink v-if="isInCall && canModerate"
<NcActionLink v-if="isInCall && canDownloadCallParticipants"
:href="downloadCallParticipantsLink"
target="_blank">
<template #icon>
Expand Down Expand Up @@ -189,7 +189,7 @@ import {
} from '../../composables/useDocumentFullscreen.ts'
import { useIsInCall } from '../../composables/useIsInCall.js'
import { CALL, CONVERSATION, PARTICIPANT } from '../../constants.js'
import { getTalkConfig } from '../../services/CapabilitiesManager.ts'
import { getTalkConfig, hasTalkFeature } from '../../services/CapabilitiesManager.ts'
import { useBreakoutRoomsStore } from '../../stores/breakoutRooms.ts'
import { useCallViewStore } from '../../stores/callView.js'
import { generateAbsoluteUrl } from '../../utils/handleUrl.ts'
Expand Down Expand Up @@ -381,6 +381,10 @@ export default {
return !this.callViewStore.isEmptyCallView
},
canDownloadCallParticipants() {
return hasTalkFeature(this.token, 'download-call-participants') && this.canModerate
},
downloadCallParticipantsLink() {
return generateOcsUrl('apps/spreed/api/v4/call/{token}/download', { token: this.token })
},
Expand Down

0 comments on commit 882f02c

Please sign in to comment.