From 016adb324bdb0e51918a831d1d97d0afbf8fe536 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 21 Apr 2022 18:51:38 +0200 Subject: [PATCH] Fixed wrong usernames in conversation dropdown --- files/lib/data/conversation/ConversationAction.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/files/lib/data/conversation/ConversationAction.class.php b/files/lib/data/conversation/ConversationAction.class.php index 3aa3c34..abe40c8 100644 --- a/files/lib/data/conversation/ConversationAction.class.php +++ b/files/lib/data/conversation/ConversationAction.class.php @@ -910,11 +910,14 @@ class ConversationAction extends AbstractDatabaseObjectAction implements if ($conversation->userID === WCF::getUser()->userID) { if ($conversation->participants > 1) { $image = ''; + $usernames = \array_column($conversation->getParticipantSummary(), 'username'); } else { $image = $conversation->getOtherParticipantProfile()->getAvatar()->getImageTag(48); + $usernames = [$conversation->getOtherParticipantProfile()->username]; } } else { $image = $conversation->getUserProfile()->getAvatar()->getImageTag(48); + $usernames = [$conversation->getUserProfile()->username]; } $link = LinkHandler::getInstance()->getControllerLink( @@ -925,8 +928,6 @@ class ConversationAction extends AbstractDatabaseObjectAction implements ] ); - $usernames = \array_column($conversation->getParticipantSummary(), 'username'); - return [ 'content' => $conversation->getTitle(), 'image' => $image, -- 2.20.1