}
$this->objectList->rewind();
- // get invisible participants
- $invisibleParticipantIDs = [];
- if (WCF::getUser()->userID != $this->conversation->userID) {
- foreach ($this->participantList as $participant) {
- /** @noinspection PhpUndefinedFieldInspection */
- if ($participant->isInvisible) {
- $invisibleParticipantIDs[] = $participant->userID;
- }
+ // get visible participants
+ $visibleParticipantIDs = [];
+ foreach ($this->participantList as $participant) {
+ /** @noinspection PhpUndefinedFieldInspection */
+ if (!$participant->isInvisible || WCF::getUser()->userID == $this->conversation->userID) {
+ $visibleParticipantIDs[] = $participant->userID;
}
}
$this->modificationLogList = new ConversationLogModificationLogList($this->conversation->conversationID);
$this->modificationLogList->getConditionBuilder()
->add("modification_log.time BETWEEN ? AND ?", [$startTime, $endTime]);
-
- if (!empty($invisibleParticipantIDs)) {
- $this->modificationLogList->getConditionBuilder()->add(
- "(modification_log.action <> ? OR modification_log.userID NOT IN (?))",
- ['leave', $invisibleParticipantIDs]
- );
- }
+ $this->modificationLogList->getConditionBuilder()->add(
+ "modification_log.userID IN (?)",
+ [$visibleParticipantIDs]
+ );
$this->modificationLogList->readObjects();
}