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:
authorJoas Schilling <coding@schilljs.com>2020-03-20 11:21:26 +0300
committerJoas Schilling <coding@schilljs.com>2020-04-07 10:31:54 +0300
commit4d35678ea6ea5ac6888fbfbe35c389f76b4ceafa (patch)
tree1cce9863d94eda510184e64b34ff81947b1a4351 /lib/Capabilities.php
parentde5c1b9b82631a5a3ab1ef5386ec3026c5b69c6e (diff)
Add a capability if the user can create conversations
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Capabilities.php')
-rw-r--r--lib/Capabilities.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Capabilities.php b/lib/Capabilities.php
index e5ec9cb37..b4c7e0724 100644
--- a/lib/Capabilities.php
+++ b/lib/Capabilities.php
@@ -65,6 +65,10 @@ class Capabilities implements IPublicCapability {
$attachments['folder'] = $this->talkConfig->getAttachmentFolder($user->getUID());
}
+ $conversations = [
+ 'can-create' => $user instanceof IUser && !$this->talkConfig->isNotAllowedToCreateConversations($user),
+ ];
+
return [
'spreed' => [
'features' => [
@@ -97,6 +101,7 @@ class Capabilities implements IPublicCapability {
'chat' => [
'max-length' => $maxChatLength,
],
+ 'conversations' => $conversations,
],
],
];