From: Antonio Ospite <ospite@studenti.unina.it>
Date: Sun, 6 Oct 2013 09:01:46 +0000 (+0200)
Subject: Show the actual name of the user the tweet comes from
X-Git-Tag: v0.1~9
X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/8da94863a9efd3a52978f14b3b4603f376665ea7?ds=sidebyside

Show the actual name of the user the tweet comes from

The old way of using just the screen name made re-tweeted messages look
like they were coming from the re-twitting user instead of the original
author. This is wrong and causes confusion, fix it.
---

diff --git a/rss_converter_twitter.com.xsl b/rss_converter_twitter.com.xsl
index b67946e..09ba933 100644
--- a/rss_converter_twitter.com.xsl
+++ b/rss_converter_twitter.com.xsl
@@ -38,10 +38,11 @@
     <xsl:variable name="screen-name" select="//div[@class='profile-card-inner']/@data-screen-name"/>
 
     <xsl:template match="//div[@id='timeline']//ol[@id='stream-items-id']//li[@data-item-type='tweet']">
+        <xsl:variable name="user-name" select=".//span[@class='username js-action-profile-name']/b"/>
         <xsl:variable name="tweet-text" select=".//p[@class='js-tweet-text tweet-text']"/>
         <item>
             <title>
-                <xsl:value-of select="concat($screen-name, ': ', $tweet-text)"/>
+                <xsl:value-of select="concat($user-name, ': ', $tweet-text)"/>
             </title>
             <link>
                 <xsl:value-of select="concat($twitterBaseURL, .//a[@class='details with-icn js-details']/@href)"/>
@@ -50,7 +51,7 @@
                 <xsl:value-of select="php:functionString('Tweeper::epoch_to_gmdate', .//small[@class='time']//span/@data-time)"/>
             </pubDate>
             <description>
-                <xsl:value-of select="concat($screen-name, ': ')"/>
+                <xsl:value-of select="concat($user-name, ': ')"/>
                 <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
                 <xsl:copy-of select="$tweet-text/node()"/>
                 <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>