diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-01-05 02:44:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 02:44:57 +0100 |
commit | 9cb74afbc48d587d406e316680c155686fca7ebd (patch) | |
tree | c8aef6cbff4230e670289300f0098497f267e008 | |
parent | c76b1978547f554038792b22c69730ab18be73c3 (diff) | |
parent | 1fbef4bf5f5fd5126adbcb833dc8daaebdf8f250 (diff) |
Merge pull request #8465 from nextcloud/add-app-config-for-default-attachment-location
Add app config to specify default attachment folder location
-rw-r--r-- | docs/settings.md | 9 | ||||
-rw-r--r-- | lib/Config.php | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/docs/settings.md b/docs/settings.md index bbe4b02bb..6780af967 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -21,10 +21,10 @@ ## User settings -| Key | Capability | Default | Valid values | -|-----------------------|-----------------------------------|---------|----------------------------------------------------------------------------------------------------------| -| `attachment_folder` | `config => attachments => folder` | `/Talk` | Path owned by the user to store uploads and received shares. It is created if it does not exist. | -| `read_status_privacy` | `config => chat => read-privacy` | `0` | One of the read-status constants from the [constants list](constants.md#participant-read-status-privacy) | +| Key | Capability | Default | Valid values | +|-----------------------|-----------------------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------| +| `attachment_folder` | `config => attachments => folder` | Value of app config `default_attachment_folder` | Path owned by the user to store uploads and received shares. It is created if it does not exist. | +| `read_status_privacy` | `config => chat => read-privacy` | `0` | One of the read-status constants from the [constants list](constants.md#participant-read-status-privacy) | ## Set SIP settings @@ -76,6 +76,7 @@ Option legend: | `hosted-signaling-server-account-id` | string | | | Account identifier of the hosted signaling server | | `matterbridge_binary` | string | | | Path to the matterbridge binary file | | `bridge_bot_password` | string | | | Automatically generated password of the matterbridge bot user profile | +| `default_attachment_folder` | string | `/Talk` | | Specify default attachment folder location | | `start_calls` | int | `0` | 🖌️ | Who can start a call, see [constants list](constants.md#start-call) | | `max-gif-size` | int | `3145728` | | Maximum file size for clients to render gifs previews with animation | | `session-ping-limit` | int | `200` | | Number of sessions the HPB can ping in a single request | diff --git a/lib/Config.php b/lib/Config.php index 9c9119271..14882d0ae 100644 --- a/lib/Config.php +++ b/lib/Config.php @@ -202,7 +202,8 @@ class Config { } public function getAttachmentFolder(string $userId): string { - return $this->config->getUserValue($userId, 'spreed', 'attachment_folder', '/Talk'); + $defaultAttachmentFolder = $this->config->getAppValue('spreed', 'default_attachment_folder', '/Talk'); + return $this->config->getUserValue($userId, 'spreed', 'attachment_folder', $defaultAttachmentFolder); } /** |