Fix adding participants that previously participated invisibly
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 26 Sep 2023 13:35:24 +0000 (15:35 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 26 Sep 2023 13:35:24 +0000 (15:35 +0200)
Adding participants after-the-fact is only allowed with visible participants.
However the case of an invisible participant being re-added after previously
being removed was not correctly handled: The participant remained invisible,
but a log message about them being added was created.

files/lib/data/conversation/ConversationEditor.class.php

index 1c98e7806032ca7f80071cec2095403362f07750..ea19168dcc8a270c25dacfffc6afb37470a4903f 100644 (file)
@@ -85,6 +85,7 @@ class ConversationEditor extends DatabaseObjectEditor
                     VALUES      (?, ?, ?, ?, ?)
                     ON DUPLICATE KEY
                     UPDATE      hideConversation = 0,
+                                isInvisible = 0,
                                 leftAt = 0,
                                 leftByOwnChoice = 1";
             $statement = WCF::getDB()->prepareStatement($sql);