[Pkg-owncloud-commits] [owncloud-client] 67/94: ServerNotificationHandler: Properly create "Dismiss" URL

Sandro Knauß hefee at debian.org
Thu Mar 29 11:12:15 UTC 2018


This is an automated email from the git hooks/post-receive script.

hefee pushed a commit to branch upstream
in repository owncloud-client.

commit 7eb2dc21af043a4b91cde5e92d5965bdaf251af3
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Feb 6 20:26:04 2018 +0100

    ServerNotificationHandler: Properly create "Dismiss" URL
    
    Qt's JSON API is confusing, it doesn't convert to a string as one expects.
---
 ChangeLog                             | 1 +
 src/gui/servernotificationhandler.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8ecc5f9..d8509f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ ChangeLog
 version 2.4.1 (2017-02-xx)
 * Ignore files with file names that can't be encoded for the filesystem (#6287, #5676, #5719)
 * Issues: Speed up insertion and add hard upper limit (#6272)
+* Notifications: Fix "Dismiss" action
 * Protocol: Remove entries for auto resolved conflicts (#6316)
 * owncloudcmd: Set proxy before capabilities call (#6281)
 * owncloudcmd: Do not do the capability call when --nonshib is passed
diff --git a/src/gui/servernotificationhandler.cpp b/src/gui/servernotificationhandler.cpp
index 72b65b2..fdf7b4d 100644
--- a/src/gui/servernotificationhandler.cpp
+++ b/src/gui/servernotificationhandler.cpp
@@ -101,7 +101,7 @@ void ServerNotificationHandler::slotNotificationsReceived(const QJsonDocument &j
         // https://github.com/owncloud/notifications/blob/master/docs/ocs-endpoint-v1.md#deleting-a-notification-for-a-user
         ActivityLink al;
         al._label = tr("Dismiss");
-        al._link  = Utility::concatUrlPath(ai->account()->url(), notificationsPath + "/" + json.value("notification_id").toString()).toString();
+        al._link  = Utility::concatUrlPath(ai->account()->url(), notificationsPath + "/" + QString::number(a._id)).toString();
         al._verb  = "DELETE";
         al._isPrimary = false;
         a._links.append(al);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list