Skip to content

Commit

Permalink
fix(TopBarMenu): check capabilities for downloading participants in call
Browse files Browse the repository at this point in the history
Signed-off-by: DorraJaouad <[email protected]>
  • Loading branch information
DorraJaouad committed Oct 25, 2024
1 parent 079a4a0 commit 6d4a49a
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 6d4a49a

Please sign in to comment.