Skip to content

Commit eb0e15d

Browse files
committed
enh: keep supporting NC >= 30
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent c13b3de commit eb0e15d

6 files changed

Lines changed: 16 additions & 10 deletions

File tree

appinfo/info.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Known providers:
6262
6363
More details on how to set this up in the [admin docs](https://docs.nextcloud.com/server/latest/admin_manual/ai/index.html)
6464
]]> </description>
65-
<version>3.0.0-dev</version>
65+
<version>2.11.0-dev</version>
6666
<licence>agpl</licence>
6767
<author>Julien Veyssier</author>
6868
<namespace>Assistant</namespace>
@@ -81,7 +81,7 @@ More details on how to set this up in the [admin docs](https://docs.nextcloud.co
8181
<screenshot>https://github.com/nextcloud/assistant/raw/main/img/screenshots/screenshot6.jpg</screenshot>
8282
<screenshot>https://github.com/nextcloud/assistant/raw/main/img/screenshots/screenshot7.jpg</screenshot>
8383
<dependencies>
84-
<nextcloud min-version="33" max-version="33"/>
84+
<nextcloud min-version="30" max-version="33"/>
8585
</dependencies>
8686
<settings>
8787
<admin>OCA\Assistant\Settings\Admin</admin>

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^8.2",
14+
"php": "^8.1",
1515
"erusev/parsedown": "^1.7",
1616
"henck/rtf-to-html": "^1.2",
1717
"html2text/html2text": "^4.3",
@@ -40,7 +40,7 @@
4040
"sort-packages": true,
4141
"optimize-autoloader": true,
4242
"platform": {
43-
"php": "8.2"
43+
"php": "8.1"
4444
},
4545
"autoloader-suffix": "Assistant"
4646
}

composer.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/TaskProcessing/AudioToAudioChatProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ public function process(?string $userId, array $input, callable $reportProgress)
143143
Application::APP_ID . ':internal',
144144
$userId,
145145
);
146-
$task->setIncludeWatermark(false);
146+
// the setIncludeWatermark method was introduced in NC 33
147+
if (method_exists($task, 'setIncludeWatermark')) {
148+
$task->setIncludeWatermark(false);
149+
}
147150
$taskOutput = $this->taskProcessingService->runTaskProcessingTask($task);
148151
$outputAudioFileId = $taskOutput['speech'];
149152

lib/TaskProcessing/ContextAgentAudioInteractionProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ public function process(?string $userId, array $input, callable $reportProgress)
143143
Application::APP_ID . ':internal',
144144
$userId,
145145
);
146-
$task->setIncludeWatermark(false);
146+
// the setIncludeWatermark method was introduced in NC 33
147+
if (method_exists($task, 'setIncludeWatermark')) {
148+
$task->setIncludeWatermark(false);
149+
}
147150
$ttsTaskOutput = $this->taskProcessingService->runTaskProcessingTask($task);
148151
$outputAudioFileId = $ttsTaskOutput['speech'];
149152
$outputAudioFileContent = $this->taskProcessingService->getOutputFileContent($outputAudioFileId);

psalm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
resolveFromConfigFile="true"
1212
ensureOverrideAttribute="false"
1313
strictBinaryOperands="false"
14-
phpVersion="8.2"
14+
phpVersion="8.1"
1515
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1616
xmlns="https://getpsalm.org/schema/config"
1717
xsi:schemaLocation="https://getpsalm.org/schema/config vendor-bin/psalm/vendor/vimeo/psalm/config.xsd"

0 commit comments

Comments
 (0)