diff options
author | Joas Schilling <coding@schilljs.com> | 2020-02-19 16:04:11 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-02-25 11:50:00 +0300 |
commit | 0930c830b031f069065d47fdafdba18eba063da8 (patch) | |
tree | 1999ac3fdf9cb454f7ec38eed5221082a5d9f7be /lib/Capabilities.php | |
parent | 531b5a9aad088ae2d410976e1ae091a1827fed91 (diff) |
Add a capability
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Capabilities.php')
-rw-r--r-- | lib/Capabilities.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Capabilities.php b/lib/Capabilities.php index 242fe4c64..b04d6a8fa 100644 --- a/lib/Capabilities.php +++ b/lib/Capabilities.php @@ -58,6 +58,13 @@ class Capabilities implements IPublicCapability { $maxChatLength = ChatManager::MAX_CHAT_LENGTH; } + $attachments = [ + 'allowed' => $user instanceof IUser, + ]; + if ($user instanceof IUser) { + $attachments['folder'] = $this->talkConfig->getAttachmentFolder($user->getUID()); + } + return [ 'spreed' => [ 'features' => [ @@ -85,6 +92,7 @@ class Capabilities implements IPublicCapability { 'circles-support', ], 'config' => [ + 'attachments' => $attachments, 'chat' => [ 'max-length' => $maxChatLength, ], |