snarfed / granary

💬 The social web translator

Home Page:https://granary.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When looking at a retweet in either mf2-json or html it looks like post by another user

EdwardHinkle opened this issue · comments

This is confusing as you don't understand why it's there. A retweet should instead be an entry with a repost-of. With the top author being the retweeter and the inner author being the original tweeter.

Here is an example feed: https://granary.io/twitter/travishinkle/@self/@app/?format=mf2-json&access_token_key=X&access_token_secret=X

The author of the feed is @travishinkle and he retweeted a user (philipnation). There is a retweet on that feed that looks like this:
{ "type": [ "h-entry" ], "properties": { "url": [ "https://twitter.com/philipnation/status/951568325338976256" ], "content": [ { "html": "Prayer is not a spiritual discipline that is separate from the mission of God. It is a discipline by which the Spirit will lead us to our role in the mission of God.", "value": "Prayer is not a spiritual discipline that is separate from the mission of God. It is a discipline by which the Spirit will lead us to our role in the mission of God." } ], "published": [ "2018-01-11T21:35:42+00:00" ], "uid": [ "tag:twitter.com:951568325338976256" ], "author": [ { "type": [ "h-card" ], "properties": { "uid": [ "tag:twitter.com:philipnation" ], "url": [ "http://philipnation.net/my-books/" ], "photo": [ "https://pbs.twimg.com/profile_images/763802468035727360/gV0sNGNo.jpg" ], "numeric-id": [ "71554731" ], "location": [ { "type": [ "h-card", "p-location" ], "properties": { "name": [ "Bradenton, FL" ] } } ], "published": [ "2009-09-04T14:59:14+00:00" ], "nickname": [ "philipnation" ], "name": [ "Philip Nation" ] } } ] } },

thanks for filing! agreed, repost-of would be nice.

for the record, the current markup definitely does visibly include philiphinkle (and not aaronpk) as the author:

<article class="h-entry">
  ...
  <span class="p-author h-card">
    <data class="p-uid" value="tag:twitter.com:philipnation"></data>
    <data class="p-numeric-id" value="71554731"></data>
    <a class="p-name u-url" href="http://philipnation.net/my-books/">Philip Nation</a>
    <span class="p-nickname">philipnation</span>
    <img class="u-photo" src="https://pbs.twimg.com/profile_images/763802468035727360/gV0sNGNo.jpg" alt="" />
  </span>

  <a class="u-url" href="https://twitter.com/philipnation/status/951568325338976256">https://twitter.com/philipnation/status/951568325338976256</a>
  <div class="e-content p-name">
  Prayer is not a spiritual discipline that is separate from the mission of God. It is a discipline by which the Spirit will lead us to our role in the mission of God.
  </div>
</article>

if anything, the current atom code is more broken here. it still (loosely) says aaron is the author. from https://granary.io/twitter/aaronpk/@self/@app/?format=atom&access_token_key=... :

<entry>
<author>
 <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
 <uri>https://aaronparecki.com/</uri>
</author>

  <id>https://twitter.com/aaronpk/status/953773666658959361</id>
  <title>Our videos for the November 2017 edition of Donut.js are up and captioned for...</title>
...
</entry>

Correct, the mf2 isn’t broken in the sense that it displays the wrong author, just that you lose why it’s in your timeline when you don’t follow the author

(Originally published at: https://eddiehinkle.com/2018/02/15/14/reply/)

deployed a fix. thanks again for filing.

also, i misspoke, the atom is ok, the content is rendered eg:

RT @philipnation Prayer is not a spiritual discipline that is separate from...

so it's appropriate that it still lists travishinkle as the author.

Looks great! The mf2 text content even ends up putting “RT @-mention text”. Thanks so much!