Skip to content

Commit 87fc916

Browse files
authored
Merge pull request #675 from nextcloud/release-1.3.0
Release 1.3.0
2 parents 3420f8c + 094c6ab commit 87fc916

File tree

3 files changed

+10
-23
lines changed

3 files changed

+10
-23
lines changed

appinfo/info.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<description><![CDATA[Push update support for desktop app.
1212
1313
Once the app is installed, the push binary needs to be setup. You can either use the setup wizard with `occ notify_push:setup` or see the [README](http://github.com/nextcloud/notify_push) for detailed setup instructions]]></description>
14-
<version>1.2.2</version>
14+
<version>1.3.0</version>
1515
<licence>agpl</licence>
1616
<author>Robin Appelman</author>
1717
<namespace>NotifyPush</namespace>
@@ -27,7 +27,7 @@ Once the app is installed, the push binary needs to be setup. You can either use
2727
<bugs>https://github.com/nextcloud/notify_push/issues</bugs>
2828

2929
<dependencies>
30-
<nextcloud min-version="27" max-version="32"/>
30+
<nextcloud min-version="29" max-version="33"/>
3131
</dependencies>
3232

3333
<repair-steps>

lib/Controller/TestController.php

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,16 @@
1616
use OCP\AppFramework\Http\DataDisplayResponse;
1717
use OCP\AppFramework\Http\DataResponse;
1818
use OCP\IAppConfig;
19-
use OCP\IConfig;
2019
use OCP\IRequest;
2120

2221
class TestController extends Controller {
23-
private $config;
24-
private $appConfig;
25-
private $queue;
26-
private $appManager;
27-
2822
public function __construct(
2923
IRequest $request,
30-
IConfig $config,
31-
IAppConfig $appConfig,
32-
IQueue $queue,
33-
IAppManager $appManager,
24+
private IAppConfig $appConfig,
25+
private IQueue $queue,
26+
private IAppManager $appManager,
3427
) {
3528
parent::__construct('notify_push', $request);
36-
$this->config = $config;
37-
$this->appConfig = $appConfig;
38-
$this->queue = $queue;
39-
$this->appManager = $appManager;
4029
}
4130

4231
/**
@@ -47,12 +36,8 @@ public function __construct(
4736
public function cookie(): DataResponse {
4837
// starting with 32, the app config does some internal caching
4938
// that interferes with the quick set+get from this test.
50-
// unfortunately the api to clear the cache is 29+ only, and we still support 27
51-
if (method_exists($this->appConfig, 'clearCache')) {
52-
/** @psalm-suppress UndefinedInterfaceMethod */
53-
$this->appConfig->clearCache();
54-
}
55-
return new DataResponse((int)$this->config->getAppValue('notify_push', 'cookie', '0'));
39+
$this->appConfig->clearCache();
40+
return new DataResponse($this->appConfig->getValueInt('notify_push', 'cookie'));
5641
}
5742

5843
/**

lib/SelfTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use OCA\NotifyPush\Queue\RedisQueue;
1414
use OCP\App\IAppManager;
1515
use OCP\Http\Client\IClientService;
16+
use OCP\IAppConfig;
1617
use OCP\IConfig;
1718
use OCP\IDBConnection;
1819
use Symfony\Component\Console\Output\OutputInterface;
@@ -28,6 +29,7 @@ class SelfTest {
2829
public function __construct(
2930
IClientService $clientService,
3031
private IConfig $config,
32+
private IAppConfig $appConfig,
3133
private IQueue $queue,
3234
private IDBConnection $connection,
3335
private IAppManager $appManager,
@@ -55,7 +57,7 @@ public function test(string $server, OutputInterface $output, bool $ignoreProxyE
5557
}
5658

5759
$this->queue->push('notify_test_cookie', $this->cookie);
58-
$this->config->setAppValue('notify_push', 'cookie', (string)$this->cookie);
60+
$this->appConfig->setValueInt('notify_push', 'cookie', $this->cookie);
5961

6062
try {
6163
$retrievedCookie = (int)$this->client->get($server . '/test/cookie', ['nextcloud' => ['allow_local_address' => true], 'verify' => false])->getBody();

0 commit comments

Comments
 (0)