Skip to content

Commit

Permalink
Merge pull request #10312 from nextcloud/bugfix/noid/add-missing-bots…
Browse files Browse the repository at this point in the history
…-v1-capability

fix(bots): Add missing bots v1 capability
  • Loading branch information
nickvergessen authored Aug 22, 2023
2 parents 143d901 + fcde021 commit c5ff7c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public function getCapabilities(): array {
'chat-keep-notifications',
'typing-privacy',
'remind-me-later',
'bots-v1',
],
'config' => [
'attachments' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</NcAppSettingsSection>

<!-- Bots settings -->
<NcAppSettingsSection v-if="selfIsOwnerOrModerator"
<NcAppSettingsSection v-if="selfIsOwnerOrModerator && hasBotV1API"
id="bots"
:title="t('spreed', 'Bots')">
<BotsSettings :token="token" />
Expand Down Expand Up @@ -213,6 +213,10 @@ export default {
return this.conversation.objectType === 'room'
},
hasBotV1API() {
return getCapabilities()?.spreed?.features?.includes('bots-v1')
},
canConfigureBreakoutRooms() {
const breakoutRoomsEnabled = getCapabilities()?.spreed?.config?.call?.['breakout-rooms'] || false
return this.canFullModerate
Expand Down
1 change: 1 addition & 0 deletions tests/php/CapabilitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public function setUp(): void {
'chat-keep-notifications',
'typing-privacy',
'remind-me-later',
'bots-v1',
'message-expiration',
'reactions',
];
Expand Down

0 comments on commit c5ff7c0

Please sign in to comment.