aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Comments
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-01-17 12:03:44 +0100
committerVitor Mattos <vitor@php.rio>2022-01-21 08:39:40 -0300
commitecb98f772ef309678c983d4f5e1ed9988e9b6fcc (patch)
tree70f88f31ed69c65b9ac6bb6b8f3f72d9b54dea27 /lib/private/Comments
parente0b89cd576a4e3ce6811807e0c02273097bfac79 (diff)
downloadnextcloud-server-ecb98f772ef309678c983d4f5e1ed9988e9b6fcc.tar.gz
nextcloud-server-ecb98f772ef309678c983d4f5e1ed9988e9b6fcc.zip
Throw if trying to save reaction without support
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Comments')
-rw-r--r--lib/private/Comments/Manager.php4
1 files changed, 4 insertions, 0 deletions
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 {