Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37563464
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: 0010-Link-to-the-original-post-for-retweets.patch
Download


From 073d93b6036f5c034fee48f335efa089310f6109 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Thu, 6 Feb 2020 08:05:46 +0100
Subject: [PATCH 10/31] 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 749dabe3..6a9f8c98 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();
-- 
2.25.2
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin