Ich benutzte folgenden Code um eine Nachricht in einer Konversation zu erstellen. Das funktioniert soweit auch gut, jedoch wird mir die Konversation danach als ungelesen angezeigt, obwohl die erstelle Nachricht ja von mir WCF::getUser()->userID kam. Muss ich die Nachricht danach noch als gelesen markieren oder sollte das von ConversationMessageAction::create nicht automatisch übernommen werden?
PHP
// save conversation message
$data = [
'time' => TIME_NOW,
'userID' => WCF::getUser()->userID,
'username' => WCF::getUser()->username,
'conversationID' => $conversation->conversationID
];
$htmlInputProcessor = new HtmlInputProcessor();
$htmlInputProcessor->process($message, 'com.woltlab.wcf.conversation.message');
$conversationData = [
'data' => $data,
'attachmentHandler' => null,
'htmlInputProcessor' => $htmlInputProcessor,
'conversation' => $conversation
];
$objectAction = new ConversationMessageAction([], 'create', $conversationData);
$resultValues = $objectAction->executeAction();
Display More