Skip to content

Commit

Permalink
feat(Call): allow moderators to download current attendance list
Browse files Browse the repository at this point in the history
Signed-off-by: DorraJaouad <dorra.jaoued7@gmail.com>
  • Loading branch information
DorraJaouad committed Oct 16, 2024
1 parent 7759320 commit 05934fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Controller/CallController.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public function getPeersForCall(): DataResponse {
*/
#[PublicPage]
#[RequireModeratorParticipant]
#[Http\Attribute\NoCSRFRequired]
public function downloadParticipantsForCall(string $format = 'csv'): DataDownloadResponse|Response {
$timeout = $this->timeFactory->getTime() - Session::SESSION_TIMEOUT;
$participants = $this->participantService->getParticipantsInCall($this->room, $timeout);
Expand Down
15 changes: 15 additions & 0 deletions src/components/TopBar/TopBarMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@
</template>
{{ t('spreed', 'Conversation settings') }}
</NcActionButton>
<NcActionLink v-if="isInCall && canModerate"
:href="downloadCallParticipantsLink"
target="_blank">
<template #icon>
<IconDownload :size="20" />
</template>
{{ t('spreed', 'Download attendance list') }}
</NcActionLink>
</NcActions>
</div>
</template>
Expand All @@ -147,6 +155,7 @@
import Cog from 'vue-material-design-icons/Cog.vue'
import DotsCircle from 'vue-material-design-icons/DotsCircle.vue'
import DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'
import IconDownload from 'vue-material-design-icons/Download.vue'
import File from 'vue-material-design-icons/File.vue'
import Fullscreen from 'vue-material-design-icons/Fullscreen.vue'
import FullscreenExit from 'vue-material-design-icons/FullscreenExit.vue'
Expand All @@ -161,6 +170,7 @@ import GridView from 'vue-material-design-icons/ViewGrid.vue'
import { showWarning } from '@nextcloud/dialogs'
import { emit } from '@nextcloud/event-bus'
import { t } from '@nextcloud/l10n'
import { generateOcsUrl } from '@nextcloud/router'

import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink.js'
Expand Down Expand Up @@ -208,6 +218,7 @@ export default {
FullscreenExit,
GridView,
HandBackLeft,
IconDownload,
MicrophoneOff,
PromotedView,
RecordCircle,
Expand Down Expand Up @@ -369,6 +380,10 @@ export default {
showCallLayoutSwitch() {
return !this.callViewStore.isEmptyCallView
},

downloadCallParticipantsLink() {
return generateOcsUrl('apps/spreed/api/v4/call/{token}/download', { token: this.token })
},
},

watch: {
Expand Down

0 comments on commit 05934fc

Please sign in to comment.