Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37563653
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: 0007-twitter-Don-t-overwrite-original-contents-of-retweet.patch
Download


From e5e60a1692fe7bed0e3537bef63747ef100d643f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= <fbriere@fbriere.net>
Date: Thu, 6 Feb 2020 00:47:34 +0100
Subject: [PATCH 07/31] 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 4052f611..749dabe3 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();
     }
 
-- 
2.25.2
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin