diff options
author | Joas Schilling <coding@schilljs.com> | 2020-03-20 11:21:26 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-04-07 10:31:54 +0300 |
commit | 4d35678ea6ea5ac6888fbfbe35c389f76b4ceafa (patch) | |
tree | 1cce9863d94eda510184e64b34ff81947b1a4351 /lib/Capabilities.php | |
parent | de5c1b9b82631a5a3ab1ef5386ec3026c5b69c6e (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.php | 5 |
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, ], ], ]; |