163163 {{ t('spreed', 'Notify about calls') }}
164164 </NcActionButton >
165165 </template >
166+
167+ <template v-if =" supportImportantConversations || supportSensitiveConversations " >
168+ <NcActionSeparator />
169+
170+ <NcActionButton v-if =" supportImportantConversations"
171+ type =" checkbox"
172+ :model-value =" item.isImportant"
173+ @click =" toggleImportant(!item.isImportant)" >
174+ <template #icon >
175+ <IconMessageAlert :size =" 16" />
176+ </template >
177+ {{ t('spreed', 'Important conversation') }}
178+ </NcActionButton >
179+
180+ <NcActionButton v-if =" supportSensitiveConversations"
181+ type =" checkbox"
182+ :model-value =" item.isSensitive"
183+ @click =" toggleSensitive(!item.isSensitive)" >
184+ <template #icon >
185+ <IconShieldLock :size =" 16" />
186+ </template >
187+ {{ t('spreed', 'Sensitive conversation') }}
188+ </NcActionButton >
189+ </template >
166190 </template >
167191 </template >
168192
@@ -239,7 +263,9 @@ import IconDelete from 'vue-material-design-icons/Delete.vue'
239263import IconExitToApp from ' vue-material-design-icons/ExitToApp.vue'
240264import IconEye from ' vue-material-design-icons/Eye.vue'
241265import IconEyeOff from ' vue-material-design-icons/EyeOff.vue'
266+ import IconMessageAlert from ' vue-material-design-icons/MessageAlert.vue'
242267import IconPhoneRing from ' vue-material-design-icons/PhoneRing.vue'
268+ import IconShieldLock from ' vue-material-design-icons/ShieldLock.vue'
243269import IconStar from ' vue-material-design-icons/Star.vue'
244270import IconVideo from ' vue-material-design-icons/Video.vue'
245271import IconVolumeHigh from ' vue-material-design-icons/VolumeHigh.vue'
@@ -263,6 +289,8 @@ import { hasTalkFeature } from '../../../services/CapabilitiesManager.ts'
263289import { copyConversationLinkToClipboard } from ' ../../../utils/handleUrl.ts'
264290
265291const supportsArchive = hasTalkFeature (' local' , ' archived-conversations-v2' )
292+ const supportImportantConversations = hasTalkFeature (' local' , ' important-conversations' )
293+ const supportSensitiveConversations = hasTalkFeature (' local' , ' sensitive-conversations' )
266294
267295const notificationLevels = [
268296 { value: PARTICIPANT .NOTIFY .ALWAYS , label: t (' spreed' , ' All messages' ) },
@@ -287,7 +315,9 @@ export default {
287315 IconExitToApp,
288316 IconEye,
289317 IconEyeOff,
318+ IconMessageAlert,
290319 IconPhoneRing,
320+ IconShieldLock,
291321 IconStar,
292322 IconVolumeHigh,
293323 IconVolumeOff,
@@ -322,6 +352,7 @@ export default {
322352 canDeleteConversation: false ,
323353 canLeaveConversation: false ,
324354 hasCall: false ,
355+ isImportant: false ,
325356 isSensitive: false ,
326357 }
327358 },
@@ -345,6 +376,8 @@ export default {
345376 return {
346377 AVATAR ,
347378 supportsArchive,
379+ supportImportantConversations,
380+ supportSensitiveConversations,
348381 submenu,
349382 isLeaveDialogOpen,
350383 isDeleteDialogOpen,
@@ -529,6 +562,24 @@ export default {
529562 })
530563 },
531564
565+ /**
566+ * Toggle the important flag for the conversation
567+ *
568+ * @param {boolean} isImportant The important flag to set.
569+ */
570+ async toggleImportant (isImportant ) {
571+ await this .$store .dispatch (' toggleImportant' , { token: this .item .token , isImportant })
572+ },
573+
574+ /**
575+ * Toggle the sensitive flag for the conversation
576+ *
577+ * @param {boolean} isSensitive The sensitive flag to set.
578+ */
579+ async toggleSensitive (isSensitive ) {
580+ await this .$store .dispatch (' toggleSensitive' , { token: this .item .token , isSensitive })
581+ },
582+
532583 onClick () {
533584 // add as temporary item that will refresh after the joining process is complete
534585 if (this .isSearchResult ) {
0 commit comments