Only try to add comment details if the comment was found

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-04-10 15:48:15 +02:00
parent d9305fc347
commit 0aed61868f

View File

@@ -283,13 +283,13 @@ class DeckProvider implements IProvider {
try {
$comment = $this->commentsManager->get((int)$subjectParams['comment']);
$event->setParsedMessage($comment->getMessage());
} catch (NotFoundException $e) {
}
$params['comment'] =[
'type' => 'highlight',
'id' => $subjectParams['comment'],
'name' => $comment->getMessage()
];
} catch (NotFoundException $e) {
}
}
return $params;
}