From: Tim Düsterhus Date: Wed, 27 Sep 2023 07:18:31 +0000 (+0200) Subject: Fix opening draft conversations X-Git-Tag: 5.4.33~1^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=da24d14a63c867d79337ac6ff879f8f0c7b93997;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Fix opening draft conversations This got broken in 40edd0891d0003c5441dfd2c067eeb5632fbc2ed, because drafts do not have any participants, thus resulting in an empty list of visible participants, breaking the database query for the modification log. Fix this by adding the conversation author to the array if it's a draft conversation. They are able to see it by definition. --- diff --git a/files/lib/page/ConversationPage.class.php b/files/lib/page/ConversationPage.class.php index b7b2ec1..fe520b1 100644 --- a/files/lib/page/ConversationPage.class.php +++ b/files/lib/page/ConversationPage.class.php @@ -303,6 +303,11 @@ class ConversationPage extends MultipleLinkPage } } + // Drafts do not store their participants in conversation_to_user. + if ($this->conversation->isDraft) { + $visibleParticipantIDs[] = $this->conversation->userID; + } + // load modification log entries $this->modificationLogList = new ConversationLogModificationLogList($this->conversation->conversationID); $this->modificationLogList->getConditionBuilder()