mirror of
https://github.com/nextcloud/spreed.git
synced 2025-07-31 02:21:34 +00:00
feat(sip): Allow to enable SIP by default
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
@ -98,6 +98,7 @@ Legend:
|
||||
| `default_permissions` | int | `246` | Yes | | Default permissions for non-moderators (see [constants list](constants.md#attendee-permissions) for bit flags) |
|
||||
| `recording_consent` | int | `0` | Yes | 🖌️ | Whether users have to agree on being recorded before they can join the call (see [constants](constants.md#recording-consent-required)) |
|
||||
| `grid_videos_limit` | int | `19` | No | | Maximum number of videos to show (additional to the own video) |
|
||||
| `sip_dialin_default` | int | `0` | No | | Default value of SIP dial-in when creating new conversations |
|
||||
| `grid_videos_limit_enforced` | string<br>`yes` or `no` | `no` | No | | Whether the number of grid videos should be enforced |
|
||||
| `changelog` | string<br>`yes` or `no` | `yes` | No | | Whether the changelog conversation is updated with new features on major releases |
|
||||
| `has_reference_id` | string<br>`yes` or `no` | `no` | Yes | | Indicator whether the clients can use the reference value to identify their message, will be automatically set to `yes` when the repair steps are executed |
|
||||
|
@ -1074,7 +1074,7 @@ class Manager {
|
||||
$result->closeCursor();
|
||||
|
||||
if ($row === false) {
|
||||
$room = $this->createRoom(Room::TYPE_CHANGELOG, $userId);
|
||||
$room = $this->createRoom(Room::TYPE_CHANGELOG, $userId, sipEnabled: Webinary::SIP_DISABLED);
|
||||
Server::get(RoomService::class)->setReadOnly($room, Room::READ_ONLY);
|
||||
|
||||
$user = $this->userManager->get($userId);
|
||||
@ -1165,6 +1165,15 @@ class Manager {
|
||||
$row['lobby_timer'] = $lobbyTimer->format(\DATE_ATOM);
|
||||
}
|
||||
}
|
||||
if ($sipEnabled === null) {
|
||||
$default = $this->config->getAppValue('spreed', 'sip_dialin_default', 'none');
|
||||
if ($default !== 'none') {
|
||||
$default = (int)$default;
|
||||
if (in_array($default, [Webinary::SIP_DISABLED, Webinary::SIP_ENABLED, Webinary::SIP_ENABLED_NO_PIN], true)) {
|
||||
$sipEnabled = $default;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($sipEnabled !== null) {
|
||||
$insert->setValue('sip_enabled', $insert->createNamedParameter($sipEnabled, IQueryBuilder::PARAM_INT));
|
||||
$row['sip_enabled'] = $sipEnabled;
|
||||
|
Reference in New Issue
Block a user