diff --git a/src/__mocks__/capabilities.ts b/src/__mocks__/capabilities.ts
index fc2f6fe0998..a6f883781f5 100644
--- a/src/__mocks__/capabilities.ts
+++ b/src/__mocks__/capabilities.ts
@@ -84,6 +84,7 @@ export const mockedCapabilities: Capabilities = {
'chat-reference-id',
'mention-permissions',
'edit-messages-note-to-self',
+ 'archived-conversations',
],
'features-local': [
'favorites',
@@ -95,6 +96,7 @@ export const mockedCapabilities: Capabilities = {
'avatar',
'remind-me-later',
'note-to-self',
+ 'archived-conversations',
],
config: {
attachments: {
diff --git a/src/components/ConversationSettings/ConversationSettingsDialog.vue b/src/components/ConversationSettings/ConversationSettingsDialog.vue
index 07e1498d75a..dd3377a257a 100644
--- a/src/components/ConversationSettings/ConversationSettingsDialog.vue
+++ b/src/components/ConversationSettings/ConversationSettingsDialog.vue
@@ -30,6 +30,15 @@
{{ t('spreed', 'The consent to be recorded will be required for each participant before joining every call.') }}
+
+ {{ t('spreed', 'Archive conversation') }}
+
+
+ {{ t('spreed', 'Archived conversations are hidden from the list. They will still be shown, if you have been mentioned directly.') }}
+
@@ -122,6 +131,8 @@ 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')
+
export default {
name: 'ConversationSettingsDialog',
@@ -149,7 +160,10 @@ export default {
setup() {
const settingsStore = useSettingsStore()
- return { settingsStore }
+ return {
+ supportsArchive,
+ settingsStore,
+ }
},
data() {
@@ -201,6 +215,10 @@ export default {
return this.$store.getters.conversation(this.token) || this.$store.getters.dummyConversation
},
+ isArchived() {
+ return this.conversation.isArchived
+ },
+
participantType() {
return this.conversation.participantType
},
@@ -273,7 +291,11 @@ export default {
setShowMediaSettings(newValue) {
this.settingsStore.setShowMediaSettings(this.token, newValue)
- }
+ },
+
+ async toggleArchiveConversation() {
+ await this.$store.dispatch('toggleArchive', this.conversation)
+ },
},
}
diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.vue b/src/components/LeftSidebar/ConversationsList/Conversation.vue
index b87ab7fac08..cf6648684bb 100644
--- a/src/components/LeftSidebar/ConversationsList/Conversation.vue
+++ b/src/components/LeftSidebar/ConversationsList/Conversation.vue
@@ -57,6 +57,17 @@
{{ t('spreed', 'Conversation settings') }}
+
+
+
+
+
+ {{ labelArchive }}
+
+