Skip to content

Commit

Permalink
fix(chat): Fix summarizing chats if there are blocks with only invisi…
Browse files Browse the repository at this point in the history
…ble messages

Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Nov 20, 2024
1 parent f8ccd18 commit 2ca05ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Controller/ChatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ public function summarizeChat(
$messages = [];
$nextOffset = 0;
foreach ($comments as $comment) {
$nextOffset = (int)$comment->getId();
$message = $this->messageParser->createMessage($this->room, $this->participant, $comment, $this->l);
$this->messageParser->parseMessage($message);

Expand Down Expand Up @@ -590,7 +591,6 @@ public function summarizeChat(
}

$messages[] = $displayName . ': ' . $parsedMessage;
$nextOffset = (int)$comment->getId();
}

if (empty($messages)) {
Expand Down

0 comments on commit 2ca05ff

Please sign in to comment.