From b4545c04fb79b61e9ca2450ad3521e0f88e26c56 Mon Sep 17 00:00:00 2001 From: DorraJaouad Date: Mon, 29 Apr 2024 14:36:33 +0200 Subject: [PATCH 1/3] feat(OpenConversationsList): expose description Signed-off-by: DorraJaouad --- lib/Service/RoomFormatter.php | 1 + .../ConversationsList/Conversation.spec.js | 5 +++-- .../ConversationSearchResult.vue | 11 ++++------ .../ConversationsSearchListVirtual.vue | 7 ++----- .../OpenConversationsList.vue | 5 +++++ src/composables/useConversationInfo.js | 21 ++++++++++++------- 6 files changed, 29 insertions(+), 21 deletions(-) diff --git a/lib/Service/RoomFormatter.php b/lib/Service/RoomFormatter.php index c850bc54e66..54630f9e0a4 100644 --- a/lib/Service/RoomFormatter.php +++ b/lib/Service/RoomFormatter.php @@ -162,6 +162,7 @@ public function formatRoomV4( return array_merge($roomData, [ 'name' => $room->getName(), 'displayName' => $room->getDisplayName($isListingBreakoutRooms || $isSIPBridgeRequest || $this->userId === null ? '' : $this->userId, $isListingBreakoutRooms || $isSIPBridgeRequest), + 'description' => $room->getListable() !== Room::LISTABLE_NONE ? $room->getDescription() : '', 'objectType' => $room->getObjectType(), 'objectId' => $room->getObjectId(), 'readOnly' => $room->getReadOnly(), diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js index 8da01b3e1a1..64cc217ebb1 100644 --- a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js +++ b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js @@ -191,10 +191,11 @@ describe('Conversation.vue', () => { testConversationLabel(item, 'Guest: hello') }) - test('displays last message for search results', () => { + test('displays description for search results', () => { // search results have no actor id item.actorId = null - testConversationLabel(item, 'Alice: hello', true) + item.description = 'This is a description' + testConversationLabel(item, 'This is a description', true) }) }) diff --git a/src/components/LeftSidebar/ConversationsList/ConversationSearchResult.vue b/src/components/LeftSidebar/ConversationsList/ConversationSearchResult.vue index 2e47ed7f0d9..3518a1b35ef 100644 --- a/src/components/LeftSidebar/ConversationsList/ConversationSearchResult.vue +++ b/src/components/LeftSidebar/ConversationsList/ConversationSearchResult.vue @@ -22,7 +22,7 @@