$sql = "SELECT COUNT(*) AS participants
FROM wcf".WCF_N."_conversation_to_user
WHERE conversationID = ?
+ AND hideConversation <> ?
AND participantID IS NOT NULL";
- $existingParticipantStatement = WCF::getDB()->prepareStatement($sql, 5);
+ $existingParticipantStatement = WCF::getDB()->prepareStatement($sql);
$obsoleteConversations = [];
$updateData = [];
if (!$conversation->userID) $obsolete = true;
}
else {
- $existingParticipantStatement->execute([$conversation->conversationID]);
+ $existingParticipantStatement->execute([$conversation->conversationID, Conversation::STATE_LEFT]);
$row = $existingParticipantStatement->fetchSingleRow();
if (!$row['participants']) $obsolete = true;
}