Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to disable public conversations #8357

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Don't ask for emails in first place instead of not rendering them
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Nov 16, 2022
commit b50604ce49995a810b1ca8e0868ccbf610992851
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@click="handleClickParticipant" />
</template>

<template v-if="addableEmails.length !== 0 && publicRoomsEnabled">
<template v-if="addableEmails.length !== 0">
<NcAppNavigationCaption :title="t('spreed', 'Add emails')" />
<ParticipantsList :items="addableEmails"
@click="handleClickParticipant" />
Expand Down Expand Up @@ -103,7 +103,6 @@ import NcAppNavigationCaption from '@nextcloud/vue/dist/Components/NcAppNavigati
import Hint from '../../../Hint.vue'
import AccountPlus from 'vue-material-design-icons/AccountPlus.vue'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import { loadState } from '@nextcloud/initial-state'

export default {
name: 'ParticipantsSearchResults',
Expand Down Expand Up @@ -165,12 +164,6 @@ export default {
},
},

data() {
return {
publicRoomsEnabled: loadState('spreed', 'public_rooms_allowed'),
}
},

computed: {
sourcesWithoutResults() {
return !this.addableUsers.length
Expand Down
2 changes: 1 addition & 1 deletion src/services/conversationsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const searchPossibleConversations = async function({ searchText, token, onlyUser
if (!onlyUsers) {
shareTypes.push(SHARE.TYPE.GROUP)
shareTypes.push(SHARE.TYPE.CIRCLE)
if (token !== 'new') {
if (token !== 'new' && loadState('spreed', 'public_rooms_allowed')) {
shareTypes.push(SHARE.TYPE.EMAIL)

if (loadState('spreed', 'federation_enabled')) {
Expand Down