diff options
author | Vitor Mattos <vitor@php.rio> | 2022-04-08 17:11:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-08 17:11:29 +0300 |
commit | 8d1afaacb9be67364c7f661cf6c538114ea6aec0 (patch) | |
tree | 33d93f2d84350c380552ccf45ab3aa85798524a8 /lib/Chat/ReactionManager.php | |
parent | a62ad755aadb4be7b345500f7c191ace4b1819ba (diff) | |
parent | 55ace3d96773c446623b79750aee101c77eb8f6f (diff) |
Merge pull request #7114 from nextcloud/techdebt/7078/const-for-verbsv14.0.0-beta.1
Add constants for the verbs in the oc_comments table
Diffstat (limited to 'lib/Chat/ReactionManager.php')
-rw-r--r-- | lib/Chat/ReactionManager.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Chat/ReactionManager.php b/lib/Chat/ReactionManager.php index 5306f2d88..3e7997ccd 100644 --- a/lib/Chat/ReactionManager.php +++ b/lib/Chat/ReactionManager.php @@ -94,7 +94,7 @@ class ReactionManager { ); $comment->setParentId($parentMessage->getId()); $comment->setMessage($reaction); - $comment->setVerb('reaction'); + $comment->setVerb(ChatManager::VERB_REACTION); $this->commentsManager->save($comment); $this->notifier->notifyReacted($chat, $parentMessage, $comment); @@ -130,7 +130,7 @@ class ReactionManager { 'deleted_on' => $this->timeFactory->getDateTime()->getTimestamp(), ]) ); - $comment->setVerb('reaction_deleted'); + $comment->setVerb(ChatManager::VERB_REACTION_DELETED); $this->commentsManager->save($comment); $this->chatManager->addSystemMessage( @@ -186,8 +186,8 @@ class ReactionManager { if ($comment->getObjectType() !== 'chat' || $comment->getObjectId() !== (string) $chat->getId() || !in_array($comment->getVerb(), [ - 'comment', - 'object_shared', + ChatManager::VERB_MESSAGE, + ChatManager::VERB_OBJECT_SHARED, ], true)) { throw new ReactionOutOfContextException(); } |