Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: norb...@preining.info

Please unblock package rssguard

[ Reason ]
rssguard checks in regular interval for new rss feeds, and
sends desktop notifications when new items are found.

The current version (as well as the development branch until
recently) had a bug that, when using nextcloud (and maybe others)
as news provider, considered any unread item as new and resent
desktop notifications again and again.

The reason for this misbehavior was a misinterpretation of UTC versus
local time stamps (misreading of the API documentation).

[ Impact ]
If not unblock, users with the Nextcloud News provider (and maybe
others) will see permanent desktop notifications.

[ Tests ]
Installation and confirmation that the issue has been fixed.

[ Risks ]
None that I see.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock rssguard/3.9.0+dfsg-2

Best

Norbert

--
PREINING Norbert                              https://www.preining.info
Fujitsu Research Labs  +  IFMGA Guide + TU Wien + TeX Live + Debian Dev
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
diff -Nru rssguard-3.9.0+dfsg/debian/changelog 
rssguard-3.9.0+dfsg/debian/changelog
--- rssguard-3.9.0+dfsg/debian/changelog        2021-02-25 11:11:50.000000000 
+0900
+++ rssguard-3.9.0+dfsg/debian/changelog        2021-03-29 19:52:34.000000000 
+0900
@@ -1,3 +1,9 @@
+rssguard (3.9.0+dfsg-2) unstable; urgency=medium
+
+  * Backport upstream fix for repeated notifications.
+
+ -- Norbert Preining <norb...@preining.info>  Mon, 29 Mar 2021 19:52:34 +0900
+
 rssguard (3.9.0+dfsg-1) unstable; urgency=medium
 
   * New upstream version 3.9.0+dfsg
diff -Nru rssguard-3.9.0+dfsg/debian/patches/series 
rssguard-3.9.0+dfsg/debian/patches/series
--- rssguard-3.9.0+dfsg/debian/patches/series   1970-01-01 09:00:00.000000000 
+0900
+++ rssguard-3.9.0+dfsg/debian/patches/series   2021-03-29 19:52:34.000000000 
+0900
@@ -0,0 +1 @@
+upstream-utc-nextcloud-7709d657f
diff -Nru rssguard-3.9.0+dfsg/debian/patches/upstream-utc-nextcloud-7709d657f 
rssguard-3.9.0+dfsg/debian/patches/upstream-utc-nextcloud-7709d657f
--- rssguard-3.9.0+dfsg/debian/patches/upstream-utc-nextcloud-7709d657f 
1970-01-01 09:00:00.000000000 +0900
+++ rssguard-3.9.0+dfsg/debian/patches/upstream-utc-nextcloud-7709d657f 
2021-03-29 19:52:34.000000000 +0900
@@ -0,0 +1,48 @@
+---
+ src/librssguard/miscellaneous/textfactory.cpp                        |    2 +-
+ src/librssguard/miscellaneous/textfactory.h                          |    2 +-
+ src/librssguard/services/owncloud/network/owncloudnetworkfactory.cpp |    4 
++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/src/librssguard/miscellaneous/textfactory.cpp
++++ b/src/librssguard/miscellaneous/textfactory.cpp
+@@ -130,7 +130,7 @@ QDateTime TextFactory::parseDateTime(con
+ }
+ 
+ QDateTime TextFactory::parseDateTime(qint64 milis_from_epoch) {
+-  return QDateTime::fromMSecsSinceEpoch(milis_from_epoch);
++  return QDateTime::fromMSecsSinceEpoch(milis_from_epoch, Qt::TimeSpec::UTC);
+ }
+ 
+ QString TextFactory::encrypt(const QString& text) {
+--- a/src/librssguard/miscellaneous/textfactory.h
++++ b/src/librssguard/miscellaneous/textfactory.h
+@@ -26,7 +26,7 @@ class TextFactory {
+     static QDateTime parseDateTime(const QString& date_time);
+ 
+     // Converts 1970-epoch miliseconds to date/time.
+-    // NOTE: This apparently returns date/time in localtime.
++    // NOTE: This method tries to always return time in UTC.
+     static QDateTime parseDateTime(qint64 milis_from_epoch);
+     static QString encrypt(const QString& text);
+     static QString decrypt(const QString& text);
+--- a/src/librssguard/services/owncloud/network/owncloudnetworkfactory.cpp
++++ b/src/librssguard/services/owncloud/network/owncloudnetworkfactory.cpp
+@@ -580,7 +580,7 @@ QList<Message>OwnCloudGetMessagesRespons
+     msg.m_contents = message_map["body"].toString();
+     msg.m_created = 
TextFactory::parseDateTime(message_map["pubDate"].toDouble() * 1000);
+     msg.m_createdFromFeed = true;
+-    msg.m_customId = message_map["id"].isString() ? 
message_map["id"].toString() : QString::number(message_map["id"].toInt());
++    msg.m_customId = message_map["id"].toVariant().toString();
+     msg.m_customHash = message_map["guidHash"].toString();
+ 
+     QString enclosure_link = message_map["enclosureLink"].toString();
+@@ -593,7 +593,7 @@ QList<Message>OwnCloudGetMessagesRespons
+       msg.m_enclosures.append(enclosure);
+     }
+ 
+-    msg.m_feedId = message_map["feedId"].toString();
++    msg.m_feedId = message_map["feedId"].toVariant().toString();
+     msg.m_isImportant = message_map["starred"].toBool();
+     msg.m_isRead = !message_map["unread"].toBool();
+     msg.m_title = message_map["title"].toString();

Reply via email to