From 6ca3871f0998891093f9099cd4a12b0c122625f7 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Thu, 14 Nov 2024 14:33:33 +0100 Subject: [PATCH] fix: hide archive-conversations feature from 20.1.0rc1 Signed-off-by: Maksim Sukharev --- src/__mocks__/capabilities.ts | 2 ++ .../ConversationSettings/ConversationSettingsDialog.vue | 2 +- src/components/ConversationSettings/DangerZone.vue | 2 +- src/components/LeftSidebar/ConversationsList/Conversation.vue | 2 +- src/components/LeftSidebar/LeftSidebar.vue | 2 +- src/utils/conversation.js | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/__mocks__/capabilities.ts b/src/__mocks__/capabilities.ts index fe67a337f0..4064044190 100644 --- a/src/__mocks__/capabilities.ts +++ b/src/__mocks__/capabilities.ts @@ -86,6 +86,7 @@ export const mockedCapabilities: Capabilities = { 'edit-messages-note-to-self', 'archived-conversations', 'talk-polls-drafts', + 'archived-conversations-v2', ], 'features-local': [ 'favorites', @@ -98,6 +99,7 @@ export const mockedCapabilities: Capabilities = { 'remind-me-later', 'note-to-self', 'archived-conversations', + 'archived-conversations-v2', ], config: { attachments: { diff --git a/src/components/ConversationSettings/ConversationSettingsDialog.vue b/src/components/ConversationSettings/ConversationSettingsDialog.vue index 011a77b3fa..05b5f6986c 100644 --- a/src/components/ConversationSettings/ConversationSettingsDialog.vue +++ b/src/components/ConversationSettings/ConversationSettingsDialog.vue @@ -132,7 +132,7 @@ import { CALL, CONFIG, PARTICIPANT, CONVERSATION } from '../../constants.js' import { getTalkConfig, hasTalkFeature } from '../../services/CapabilitiesManager.ts' import { useSettingsStore } from '../../stores/settings.js' -const supportsArchive = hasTalkFeature('local', 'archived-conversations') +const supportsArchive = hasTalkFeature('local', 'archived-conversations-v2') export default { name: 'ConversationSettingsDialog', diff --git a/src/components/ConversationSettings/DangerZone.vue b/src/components/ConversationSettings/DangerZone.vue index c366c1df97..396af062b3 100644 --- a/src/components/ConversationSettings/DangerZone.vue +++ b/src/components/ConversationSettings/DangerZone.vue @@ -110,7 +110,7 @@ import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js' import { hasTalkFeature } from '../../services/CapabilitiesManager.ts' -const supportsArchive = hasTalkFeature('local', 'archived-conversations') +const supportsArchive = hasTalkFeature('local', 'archived-conversations-v2') export default { name: 'DangerZone', diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.vue b/src/components/LeftSidebar/ConversationsList/Conversation.vue index 17579eedf2..a859a462cd 100644 --- a/src/components/LeftSidebar/ConversationsList/Conversation.vue +++ b/src/components/LeftSidebar/ConversationsList/Conversation.vue @@ -178,7 +178,7 @@ import { PARTICIPANT } from '../../../constants.js' import { hasTalkFeature } from '../../../services/CapabilitiesManager.ts' import { copyConversationLinkToClipboard } from '../../../utils/handleUrl.ts' -const supportsArchive = hasTalkFeature('local', 'archived-conversations') +const supportsArchive = hasTalkFeature('local', 'archived-conversations-v2') export default { name: 'Conversation', diff --git a/src/components/LeftSidebar/LeftSidebar.vue b/src/components/LeftSidebar/LeftSidebar.vue index d4847d3289..bb97ed0c34 100644 --- a/src/components/LeftSidebar/LeftSidebar.vue +++ b/src/components/LeftSidebar/LeftSidebar.vue @@ -381,7 +381,7 @@ const canModerateSipDialOut = hasTalkFeature('local', 'sip-support-dialout') && getTalkConfig('local', 'call', 'sip-dialout-enabled') && getTalkConfig('local', 'call', 'can-enable-sip') const canNoteToSelf = hasTalkFeature('local', 'note-to-self') -const supportsArchive = hasTalkFeature('local', 'archived-conversations') +const supportsArchive = hasTalkFeature('local', 'archived-conversations-v2') export default { name: 'LeftSidebar', diff --git a/src/utils/conversation.js b/src/utils/conversation.js index 41ec90ef87..9d12eda9c0 100644 --- a/src/utils/conversation.js +++ b/src/utils/conversation.js @@ -5,7 +5,7 @@ import { CONVERSATION, PARTICIPANT } from '../constants.js' import { hasTalkFeature } from '../services/CapabilitiesManager.ts' -const supportsArchive = hasTalkFeature('local', 'archived-conversations') +const supportsArchive = hasTalkFeature('local', 'archived-conversations-v2') /** * check if the conversation has unread messages