summaryrefslogtreecommitdiffstats
path: root/lib/private/Comments/Manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Comments/Manager.php')
-rw-r--r--lib/private/Comments/Manager.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php
index 123e4f6988d..31107c1b9fb 100644
--- a/lib/private/Comments/Manager.php
+++ b/lib/private/Comments/Manager.php
@@ -39,6 +39,7 @@ use OCP\Comments\NotFoundException;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IConfig;
use OCP\IDBConnection;
+use OCP\IEmojiHelper;
use OCP\IUser;
use OCP\IInitialStateService;
use OCP\PreConditionNotMetException;
@@ -59,7 +60,7 @@ class Manager implements ICommentsManager {
/** @var ITimeFactory */
protected $timeFactory;
- /** @var EmojiHelper */
+ /** @var IEmojiHelper */
protected $emojiHelper;
/** @var IInitialStateService */
@@ -81,7 +82,7 @@ class Manager implements ICommentsManager {
LoggerInterface $logger,
IConfig $config,
ITimeFactory $timeFactory,
- EmojiHelper $emojiHelper,
+ IEmojiHelper $emojiHelper,
IInitialStateService $initialStateService) {
$this->dbConn = $dbConn;
$this->logger = $logger;
@@ -153,7 +154,7 @@ class Manager implements ICommentsManager {
throw new \UnexpectedValueException('Actor, Object and Verb information must be provided for saving');
}
- if ($comment->getVerb() === 'reaction' && !$this->emojiHelper->isValidEmoji($comment->getMessage())) {
+ if ($comment->getVerb() === 'reaction' && !$this->emojiHelper->isValidSingleEmoji($comment->getMessage())) {
// 4 characters: laptop + person + gender + skin color => "🧑🏽‍💻" is a single emoji from the picker
throw new \UnexpectedValueException('Reactions can only be a single emoji');
}