Throw if trying to save reaction without support

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/30379/head
Joas Schilling 4 years ago committed by Vitor Mattos
parent e0b89cd576
commit ecb98f772e
No known key found for this signature in database
GPG Key ID: B7AB4B76A7CA7318
  1. 4
      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 {

Loading…
Cancel
Save