mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 22:15:57 +03:00
Notify even if pre-fetch etag header is empty
This prevents situations where the server does not provide an etag header. This would make the empty pre-fetch and empty post-fetch etag headers match, meaning notifications would never be notified Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
291f0c8c85
commit
6b0e485ab9
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ void ServerNotificationHandler::slotNotificationsReceived(const QJsonDocument &j
|
|||
// In theory the server should five us a 304 Not Modified if there are no new notifications.
|
||||
// But in practice, the server doesn't always do that. So we need to compare the ETag headers.
|
||||
const auto postFetchEtagHeader = _accountState->notificationsEtagResponseHeader();
|
||||
if (_preFetchEtagHeader == postFetchEtagHeader) {
|
||||
if (!_preFetchEtagHeader.isEmpty() || _preFetchEtagHeader == postFetchEtagHeader) {
|
||||
qCInfo(lcServerNotification) << "Notifications ETag header is the same as before, no new notifications.";
|
||||
deleteLater();
|
||||
emit jobFinished();
|
||||
|
|
Loading…
Reference in a new issue