Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37560099
en ru br
ALT Linux repos
S:1.7.0-alt3

Group :: Networking/Instant messaging
RPM: choqok

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0019-Fix-retrieving-Twitter-conversations.patch
Download


From ce6fb139a7e9bd9b6aee825e4fc7fb34482cc77d Mon Sep 17 00:00:00 2001
From: Andrea Scarpino <scarpino@kde.org>
Date: Tue, 11 Feb 2020 11:07:54 +0100
Subject: [PATCH 19/31] Fix retrieving Twitter conversations
Summary:
Fix a regression from 0ecc05c1 where choqok can no longer retrieve Twitter conversations due to a mismatch between the authorization header and the actual post url
This was already fixed for requestTimeLine in f8285c35 but not for fetchPost
BUG: 417193
Test Plan: Clicked on "Display conversation" in a tweet from the timeline, no more authorization errors and the conversation is displayed correctly
Reviewers: scarpino
Reviewed By: scarpino
Differential Revision: https://phabricator.kde.org/D27236
---
 microblogs/twitter/twittermicroblog.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/microblogs/twitter/twittermicroblog.cpp b/microblogs/twitter/twittermicroblog.cpp
index 6a9f8c98..ff56e0f1 100644
--- a/microblogs/twitter/twittermicroblog.cpp
+++ b/microblogs/twitter/twittermicroblog.cpp
@@ -495,7 +495,6 @@ void TwitterMicroBlog::fetchPost(Choqok::Account *theAccount, Choqok::Post *post
     QUrl url = account->apiUrl();
     url.setPath(url.path() + QStringLiteral("/statuses/show/%1.json").arg(post->postId));
 
-    QUrl tmpUrl(url);
     QUrlQuery urlQuery;
     urlQuery.addQueryItem(QLatin1String("tweet_mode"), QLatin1String("extended"));
     url.setQuery(urlQuery);
@@ -510,7 +509,7 @@ void TwitterMicroBlog::fetchPost(Choqok::Account *theAccount, Choqok::Post *post
     }
     job->addMetaData(QStringLiteral("customHTTPHeader"),
                      QStringLiteral("Authorization: ") +
-                     QLatin1String(authorizationHeader(account, tmpUrl, QNetworkAccessManager::GetOperation)));
+                     QLatin1String(authorizationHeader(account, url, QNetworkAccessManager::GetOperation)));
     mFetchPostMap[ job ] = post;
     mJobsAccount[ job ] = theAccount;
     connect(job, &KIO::StoredTransferJob::result, this, &TwitterMicroBlog::slotFetchPost);
-- 
2.25.2
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin