Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ Legend:
| `samples_directory` | string | | No | | Specify a readable directory that contains other sample conversation data |
| `start_calls` | int | `0` | Yes | 🖌️ | Who can start a call, see [constants list](constants.md#start-call) |
| `max_call_duration` | int | `0` | No | | Maximum duration of a call in seconds, 0 for unlimited. Federated calls will be terminated based on the setting of the host server. Calls are ended via a background job, so system cron should be used and calls will last a bit longer (until the next execution of the cron). |

| `max_gif_size` | int | `3145728` | No | | Maximum file size for clients to render gifs previews with animation |
| `session-ping-limit` | int | `200` | No | | Number of sessions the HPB can ping in a single request |

| `session_ping_limit` | int | `200` | No | | Number of sessions the HPB can ping in a single request |
| `token_entropy` | int | `8` | No | | Length of conversation tokens, can be increased to make tokens harder to guess but reduces readability and dial-in comfort |
| `default_group_notification` | int | `1` | No | 🖌️ | Default notification level for group conversations [constants list](constants.md#participant-notification-levels) (Default changed from 2 (mentions) to 1 (always) in Nextcloud 33 for new installations) |
| `default_permissions` | int | `246` | Yes | | Default permissions for non-moderators (see [constants list](constants.md#attendee-permissions) for bit flags) |
Expand Down
2 changes: 1 addition & 1 deletion lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public function getCapabilities(): array {
'max-gif-size' => $this->appConfig->getAppValueInt(Config::MAX_GIF_SIZE, 3145728),
],
'signaling' => [
'session-ping-limit' => max(0, (int)$this->serverConfig->getAppValue('spreed', 'session-ping-limit', '200')),
'session-ping-limit' => max(0, $this->appConfig->getAppValueInt(Config::SESSION_PING_LIMIT)),
'mode' => $this->talkConfig->getSignalingMode(),
// 'hello-v2-token-key' => string,
],
Expand Down
1 change: 1 addition & 0 deletions lib/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class Config {
public const string MATTERBRIDGE_ENABLED = 'enable_matterbridge';
public const string DELETE_ONE_TO_ONE_CONVERSATIONS = 'delete_one_to_one_conversations';
public const string MAX_GIF_SIZE = 'max_gif_size';
public const string SESSION_PING_LIMIT = 'session_ping_limit';

/**
* 1. Call recording, …
Expand Down
1 change: 1 addition & 0 deletions lib/ConfigLexicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function getAppConfigs(): array {
new Entry(Config::MATTERBRIDGE_ENABLED, ValueType::BOOL, false, definition: 'Whether the Matterbridge integration is enabled and can be configured'),
new Entry(Config::DELETE_ONE_TO_ONE_CONVERSATIONS, ValueType::BOOL, false, definition: 'Whether one-to-one conversations can be left by either participant or should be deleted when one participant leaves'),
new Entry(Config::MAX_GIF_SIZE, ValueType::INT, 3145728, definition: 'Maximum file size for clients to render gifs previews with animation', rename: 'max-gif-size'),
new Entry(Config::SESSION_PING_LIMIT, ValueType::INT, 200, definition: 'Number of sessions the HPB can ping in a single request', rename: 'session-ping-limit'),
];
}

Expand Down
6 changes: 3 additions & 3 deletions tests/php/CapabilitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ public function testGetCapabilitiesGuest(): void {
->method('getAppValue')
->willReturnMap([
['spreed', 'start_calls', (string)Room::START_CALL_EVERYONE, (string)Room::START_CALL_EVERYONE],
['spreed', 'session-ping-limit', '200', '200'],
['core', 'backgroundjobs_mode', 'ajax', 'cron'],
]);

Expand All @@ -155,6 +154,7 @@ public function testGetCapabilitiesGuest(): void {
['summary_threshold', 100, 100],
['feature_hints_hidden', 0, 999],
['max_gif_size', 3145728, 200000],
['session_ping_limit', 200, 200],
]);

$this->assertInstanceOf(IPublicCapability::class, $capabilities);
Expand Down Expand Up @@ -353,7 +353,6 @@ public function testGetCapabilitiesUserAllowed(bool $isNotAllowed, bool $canCrea
->method('getAppValue')
->willReturnMap([
['spreed', 'start_calls', (string)Room::START_CALL_EVERYONE, (string)Room::START_CALL_NOONE],
['spreed', 'session-ping-limit', '200', '50'],
['core', 'backgroundjobs_mode', 'ajax', 'cron'],
]);

Expand All @@ -364,7 +363,7 @@ public function testGetCapabilitiesUserAllowed(bool $isNotAllowed, bool $canCrea
['backgrounds_upload_users', true, true],
]);

$this->appConfig->method('getAppValueInt')
$this->appConfig->expects($this->any())->method('getAppValueInt')
->willReturnMap([
['max_call_duration', 0, 0],
['retention_event_rooms', 28, 28],
Expand All @@ -375,6 +374,7 @@ public function testGetCapabilitiesUserAllowed(bool $isNotAllowed, bool $canCrea
['summary_threshold', 100, 100],
['feature_hints_hidden', 0, 1],
['max_gif_size', 3145728, 200000],
['session_ping_limit', 200, 50],
]);

$this->serverConfig->expects($this->any())
Expand Down
Loading