Browse Source

Minor things

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/8445/head
Joas Schilling 3 years ago
parent
commit
630924f162
No known key found for this signature in database GPG Key ID: 74434EFE0D2E2205
  1. 4
      docs/capabilities.md
  2. 2
      docs/settings.md
  3. 9
      lib/Capabilities.php
  4. 5
      lib/Config.php

4
docs/capabilities.md

@ -108,7 +108,7 @@ title: Capabilities
## 16
* `breakout-rooms-v1` - Whether breakout-rooms API v1 is available
* `config => call => breakout-rooms` - Whether breakout rooms are enabled on this instance
* `avatar` - Avatar of conversation
* `recording-v1` - Call recording is available.
* `config => call => recording` - Call recording is enabled. Only if app setting `call_recording` is equal to `yes` and isn't signaling internal.
* `config => call => breakout-rooms` - Whether breakout rooms are enabled on this instance
* `config => call => recording` - Whether calls can be recorded (requires the High-performance backend server)

2
docs/settings.md

@ -88,8 +88,8 @@ Option legend:
| `hide_signaling_warning` | string<br>`yes` or `no` | `no` | 🖌️ | Flag that allows to suppress the warning that an HPB should be configured |
| `signaling_dev` | string<br>`yes` or `no` | `no` | | Developer flag that allows to suppress various requirements like a Redis server when using the HPB |
| `breakout_rooms` | string<br>`yes` or `no` | `yes` | | Whether or not breakout rooms are allowed (Will only prevent creating new breakout rooms. Existing conversations are not modified.) |
| `call_recording` | string<br>`yes` or `no` | `yes` | | Enable call recording |
| `federation_enabled` | string<br>`yes` or `no` | `no` | | 🏗️ *Work in progress:* Whether or not federation with this instance is allowed |
| `conversations_files` | string<br>`1` or `0` | `1` | 🖌️ | Whether the files app integration is enabled allowing to start conversations in the right sidebar |
| `conversations_files_public_shares` | string<br>`1` or `0` | `1` | 🖌️ | Whether the public share integration is enabled allowing to start conversations in the right sidebar on the public share page (Requires `conversations_files` also to be enabled) |
| `enable_matterbridge` | string<br>`1` or `0` | `0` | 🖌️ | Whether the matterbridge integration is enabled and can be configured |
| `call_recording` | string<br>`yes` or `no` | `yes` | | Enable call recording |

9
lib/Capabilities.php

@ -123,12 +123,15 @@ class Capabilities implements IPublicCapability {
'call' => [
'enabled' => ((int) $this->serverConfig->getAppValue('spreed', 'start_calls', Room::START_CALL_EVERYONE)) !== Room::START_CALL_NOONE,
'breakout-rooms' => $this->talkConfig->isBreakoutRoomsEnabled(),
'recording' => $this->talkConfig->isRecordingEnabled(),
],
'chat' => [
'max-length' => ChatManager::MAX_CHAT_LENGTH,
'read-privacy' => Participant::PRIVACY_PUBLIC,
],
'conversations' => [],
'conversations' => [
'can-create' => $user instanceof IUser && !$this->talkConfig->isNotAllowedToCreateConversations($user)
],
'previews' => [
'max-gif-size' => (int)$this->serverConfig->getAppValue('spreed', 'max-gif-size', '3145728'),
],
@ -147,15 +150,11 @@ class Capabilities implements IPublicCapability {
$capabilities['features'][] = 'reactions';
}
$capabilities['config']['call']['recording'] = $this->talkConfig->isRecordingEnabled();
if ($user instanceof IUser) {
$capabilities['config']['attachments']['folder'] = $this->talkConfig->getAttachmentFolder($user->getUID());
$capabilities['config']['chat']['read-privacy'] = $this->talkConfig->getUserReadPrivacy($user->getUID());
}
$capabilities['config']['conversations']['can-create'] = $user instanceof IUser && !$this->talkConfig->isNotAllowedToCreateConversations($user);
$pubKey = $this->talkConfig->getSignalingTokenPublicKey();
if ($pubKey) {
$capabilities['config']['signaling']['hello-v2-token-key'] = $pubKey;

5
lib/Config.php

@ -138,10 +138,9 @@ class Config {
public function isRecordingEnabled(): bool {
$isSignalingInternal = $this->getSignalingMode() === self::SIGNALING_INTERNAL;
$callRecordingCapability = $this->config->getAppValue('spreed', 'call_recording', 'yes');
$recordingEnabled = $callRecordingCapability === 'yes';
$recordingAllowed = $this->config->getAppValue('spreed', 'call_recording', 'yes') === 'yes';
return !$isSignalingInternal && $recordingEnabled;
return !$isSignalingInternal && $recordingAllowed;
}
public function isDisabledForUser(IUser $user): bool {

Loading…
Cancel
Save