Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2022-01-12 14:40:52 +0300
committerVitor Mattos <vitor@php.rio>2022-02-15 18:45:44 +0300
commitb2f31f2c8ec15fd435e850b4c51b79f9f6226cd5 (patch)
tree1bed8357ef4da694b12b084e330db192c1a7697c /lib/Capabilities.php
parent897fede5feb39c5ca1ab6f047e80730a51eedb17 (diff)
Add capabilities
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib/Capabilities.php')
-rw-r--r--lib/Capabilities.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Capabilities.php b/lib/Capabilities.php
index c4742a38d..f8426d58f 100644
--- a/lib/Capabilities.php
+++ b/lib/Capabilities.php
@@ -27,6 +27,7 @@ namespace OCA\Talk;
use OCA\Talk\Chat\ChatManager;
use OCP\Capabilities\IPublicCapability;
+use OCP\Comments\ICommentsManager;
use OCP\IConfig;
use OCP\IUser;
use OCP\IUserSession;
@@ -37,14 +38,18 @@ class Capabilities implements IPublicCapability {
protected $serverConfig;
/** @var Config */
protected $talkConfig;
+ /** @var ICommentsManager */
+ protected $commentsManager;
/** @var IUserSession */
protected $userSession;
public function __construct(IConfig $serverConfig,
Config $talkConfig,
+ ICommentsManager $commentsManager,
IUserSession $userSession) {
$this->serverConfig = $serverConfig;
$this->talkConfig = $talkConfig;
+ $this->commentsManager = $commentsManager;
$this->userSession = $userSession;
}
@@ -115,6 +120,10 @@ class Capabilities implements IPublicCapability {
],
];
+ if ($this->commentsManager->supportReactions()) {
+ $capabilities['features'][] = 'reactions';
+ }
+
if ($user instanceof IUser) {
$capabilities['config']['attachments']['folder'] = $this->talkConfig->getAttachmentFolder($user->getUID());
$capabilities['config']['chat']['read-privacy'] = $this->talkConfig->getUserReadPrivacy($user->getUID());