Skip to content

Commit de60df7

Browse files
Merge pull request #565 from nextcloud/backport/563/stable32
[stable32] fix(crawler): Skip notifications code completely in first run
2 parents d290fa5 + 3275088 commit de60df7

3 files changed

Lines changed: 5 additions & 11 deletions

File tree

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<name>Nextcloud announcements</name>
1010
<summary>Nextcloud announcements brings the latest news of Nextcloud into your notifications</summary>
1111
<description>Nextcloud announcements brings the latest news of Nextcloud into your notifications</description>
12-
<version>4.0.0-dev.0</version>
12+
<version>4.0.0</version>
1313
<licence>agpl</licence>
1414
<author>Joas Schilling</author>
1515
<namespace>NextcloudAnnouncements</namespace>

lib/Cron/Crawler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected function run(mixed $argument): void {
6969
$rssPubDate = (string)$rss->channel->pubDate;
7070

7171
$lastPubDate = $this->config->getAppValue($this->appName, 'pub_date', 'now');
72-
if ($lastPubDate === 'now1') {
72+
if ($lastPubDate === 'now') {
7373
// First call, don't spam the user with old stuff...
7474
$this->config->setAppValue($this->appName, 'pub_date', $rssPubDate);
7575
return;
@@ -105,7 +105,7 @@ protected function run(mixed $argument): void {
105105
$this->notificationManager->notify($notification);
106106
}
107107

108-
$this->config->getAppValue($this->appName, $id, 'published');
108+
$this->config->setAppValue($this->appName, $id, 'published');
109109
}
110110

111111
$this->config->setAppValue($this->appName, 'pub_date', $rssPubDate);

tests/psalm-baseline.xml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="6.1.0@827971f8bc7a28bb4f842f34bf8901521de1cea3">
2+
<files psalm-version="6.14.3@d0b040a91f280f071c1abcb1b77ce3822058725a">
33
<file src="lib/Cron/Crawler.php">
44
<DeprecatedMethod>
55
<code><![CDATA[getAppValue]]></code>
66
<code><![CDATA[getAppValue]]></code>
77
<code><![CDATA[getAppValue]]></code>
88
<code><![CDATA[getAppValue]]></code>
9-
<code><![CDATA[getAppValue]]></code>
9+
<code><![CDATA[setAppValue]]></code>
1010
<code><![CDATA[setAppValue]]></code>
1111
<code><![CDATA[setAppValue]]></code>
1212
</DeprecatedMethod>
13-
<InvalidReturnStatement>
14-
<code><![CDATA[$response->getBody()]]></code>
15-
</InvalidReturnStatement>
16-
<InvalidReturnType>
17-
<code><![CDATA[string]]></code>
18-
</InvalidReturnType>
1913
<PossiblyFalseArgument>
2014
<code><![CDATA[$certificate]]></code>
2115
<code><![CDATA[$certificate]]></code>

0 commit comments

Comments
 (0)