From 15489ec5ec0f2232b5e0496abecc006f783d0c63 Mon Sep 17 00:00:00 2001 From: DorraJaouad Date: Wed, 27 Sep 2023 15:26:01 +0200 Subject: [PATCH 1/9] Add note to self creation service Signed-off-by: DorraJaouad --- docs/constants.md | 1 + src/constants.js | 1 + src/services/conversationsService.js | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/docs/constants.md b/docs/constants.md index f5c4b21057c..92f2f499166 100644 --- a/docs/constants.md +++ b/docs/constants.md @@ -8,6 +8,7 @@ * `3` Public * `4` Changelog * `5` Former "One to one" (When a user is deleted from the server or removed from all their conversations, `1` "One to one" rooms are converted to this type) +* `6` Note to self ### Object types diff --git a/src/constants.js b/src/constants.js index b453316e6a7..150421afc40 100644 --- a/src/constants.js +++ b/src/constants.js @@ -72,6 +72,7 @@ export const CONVERSATION = { PUBLIC: 3, CHANGELOG: 4, ONE_TO_ONE_FORMER: 5, + NOTE_TO_SELF: 6, }, BREAKOUT_ROOM_MODE: { diff --git a/src/services/conversationsService.js b/src/services/conversationsService.js index 2f84b4e9242..28d5a718931 100644 --- a/src/services/conversationsService.js +++ b/src/services/conversationsService.js @@ -61,6 +61,14 @@ const searchListedConversations = async function({ searchText }, options) { })) } +/** + * Generate note-to-self conversation + * + */ +const fetchNoteToSelfConversation = async function() { + return axios.get(generateOcsUrl('apps/spreed/api/v4/room/note-to-self')) +} + /** * Fetch possible conversations * @@ -438,6 +446,7 @@ const deleteConversationAvatar = async function(token) { export { fetchConversations, fetchConversation, + fetchNoteToSelfConversation, searchListedConversations, searchPossibleConversations, createOneToOneConversation, From f3cd81578ef3c1409701bed95e1138b0b2c6204d Mon Sep 17 00:00:00 2001 From: DorraJaouad Date: Wed, 27 Sep 2023 15:28:45 +0200 Subject: [PATCH 2/9] Adjust the UI options based on capabilities Signed-off-by: DorraJaouad --- .../ConversationSettingsDialog.vue | 17 +++++++++++------ .../ConversationsList/Conversation.vue | 2 +- src/components/TopBar/CallButton.vue | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/ConversationSettings/ConversationSettingsDialog.vue b/src/components/ConversationSettings/ConversationSettingsDialog.vue index 8a174ef30cd..2086b80219b 100644 --- a/src/components/ConversationSettings/ConversationSettingsDialog.vue +++ b/src/components/ConversationSettings/ConversationSettingsDialog.vue @@ -36,7 +36,8 @@ {{ t('spreed', 'Conversation settings') }} -