Hello community,

here is the log from the commit of package choqok for openSUSE:Factory checked 
in at 2020-03-14 09:56:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/choqok (Old)
 and      /work/SRC/openSUSE:Factory/.choqok.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "choqok"

Sat Mar 14 09:56:59 2020 rev:37 rq:784818 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/choqok/choqok.changes    2020-02-06 
13:09:23.700374332 +0100
+++ /work/SRC/openSUSE:Factory/.choqok.new.3160/choqok.changes  2020-03-14 
09:57:05.703187418 +0100
@@ -1,0 +2,9 @@
+Sat Mar 14 00:45:38 UTC 2020 - [email protected]
+
+- Add upstream patches to fix problems that still were present in
+  the 1.7.0 release:
+  * Fix-retrieving-Twitter-conversations.patch (kde#417193)
+  * Link-to-the-original-post-for-retweets.patch
+  * twitter-Dont-overwrite-contents-of-retweets.patch (kde#370260)
+
+-------------------------------------------------------------------

New:
----
  Fix-retrieving-Twitter-conversations.patch
  Link-to-the-original-post-for-retweets.patch
  twitter-Dont-overwrite-contents-of-retweets.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ choqok.spec ++++++
--- /var/tmp/diff_new_pack.159C7O/_old  2020-03-14 09:57:06.331187879 +0100
+++ /var/tmp/diff_new_pack.159C7O/_new  2020-03-14 09:57:06.331187879 +0100
@@ -24,6 +24,10 @@
 Group:          Productivity/Networking/Other
 URL:            https://choqok.kde.org
 Source:         
https://download.kde.org/stable/%{name}/1.7/src/%{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM
+Patch0:         Fix-retrieving-Twitter-conversations.patch
+Patch1:         Link-to-the-original-post-for-retweets.patch
+Patch2:         twitter-Dont-overwrite-contents-of-retweets.patch
 BuildRequires:  extra-cmake-modules
 BuildRequires:  fdupes
 BuildRequires:  update-desktop-files
@@ -72,6 +76,7 @@
 
 %prep
 %setup -q
+%autopatch -p1
 
 %build
   %cmake_kf5 -d build

++++++ Fix-retrieving-Twitter-conversations.patch ++++++
>From ce6fb139a7e9bd9b6aee825e4fc7fb34482cc77d Mon Sep 17 00:00:00 2001
From: Andrea Scarpino <[email protected]>
Date: Tue, 11 Feb 2020 11:07:54 +0100
Subject: 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 6a9f8c9..ff56e0f 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);
-- 
cgit v1.1

++++++ Link-to-the-original-post-for-retweets.patch ++++++
>From 073d93b6036f5c034fee48f335efa089310f6109 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <[email protected]>
Date: Thu, 6 Feb 2020 08:05:46 +0100
Subject: Link to the original post for retweets

When clicking on a retweet link, go to the original post which shows the full 
context, conversation and replies instead of using the retweet Id which shows a 
140-character cut version of the tweet.

Differential Revision: https://phabricator.kde.org/D27175
---
 microblogs/twitter/twittermicroblog.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/microblogs/twitter/twittermicroblog.cpp 
b/microblogs/twitter/twittermicroblog.cpp
index 749dabe..6a9f8c9 100644
--- a/microblogs/twitter/twittermicroblog.cpp
+++ b/microblogs/twitter/twittermicroblog.cpp
@@ -473,7 +473,11 @@ Choqok::Post *TwitterMicroBlog::readPost(Choqok::Account 
*account, const QVarian
     }
 
     //postId is changed, regenerate link url
-    post->link = postUrl(account, post->author.userName, post->postId);
+    if (!post->repeatedPostId.isEmpty()) {
+        post->link = postUrl(account, post->author.userName, 
post->repeatedPostId);
+    } else {
+        post->link = postUrl(account, post->author.userName, post->postId);
+    }
 
     QVariantMap userMap = var[QLatin1String("user")].toMap();
     post->author.userId = userMap[QLatin1String("id_str")].toString();
-- 
cgit v1.1

++++++ twitter-Dont-overwrite-contents-of-retweets.patch ++++++
>From e5e60a1692fe7bed0e3537bef63747ef100d643f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= <[email protected]>
Date: Thu, 6 Feb 2020 00:47:34 +0100
Subject: twitter: Don't overwrite original contents of retweets

Retweets are apparently still subject to a 140-character limit, and may
be truncated if the original Tweet was an extended Tweet, or if the
additional "RT @user" prefix pushes them beyond the limit.

If `repeatedPostId` has been set by setRepeatedOfInfo(), then `content`
already contains the full text of the original Tweet, and we don't need
to do anything.

(This doesn't apply to TwitterSearch::readStatusesFromJsonMap(), which
does not call setRepeatedOfInfo() in the first place.)

CCBUG:370260
---
 microblogs/twitter/twittermicroblog.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/microblogs/twitter/twittermicroblog.cpp 
b/microblogs/twitter/twittermicroblog.cpp
index 4052f61..749dabe 100644
--- a/microblogs/twitter/twittermicroblog.cpp
+++ b/microblogs/twitter/twittermicroblog.cpp
@@ -468,7 +468,7 @@ Choqok::Post *TwitterMicroBlog::readPost(Choqok::Account 
*account, const QVarian
     post->replyToUser.userId = 
var[QLatin1String("in_reply_to_user_id_str")].toString();
 
     // Support for extended tweet_mode
-    if (var.contains(QLatin1String("full_text"))) {
+    if (var.contains(QLatin1String("full_text")) && 
post->repeatedPostId.isEmpty()) {
         post->content = var[QLatin1String("full_text")].toString();
     }
 
-- 
cgit v1.1


Reply via email to