From ecb98f772ef309678c983d4f5e1ed9988e9b6fcc Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 17 Jan 2022 12:03:44 +0100 Subject: [PATCH] Throw if trying to save reaction without support Signed-off-by: Joas Schilling --- lib/private/Comments/Manager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index 84e1a6a3cb4..eae84c14335 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -1099,6 +1099,10 @@ class Manager implements ICommentsManager { * @since 9.0.0 */ public function save(IComment $comment) { + if ($comment->getVerb() === 'reaction') { + $this->throwIfNotSupportReactions(); + } + if ($this->prepareCommentForDatabaseWrite($comment)->getId() === '') { $result = $this->insert($comment); } else { -- 2.39.5