socialnetworknews-api

git clone git://archive.git.mtrnord.blog/SocialNetworkNews/socialnetworknews-api.git
Log | Files | Refs | LICENSE

commit 6ee2478e0d653e0d2785b8b6563864c2b7e15172
parent 21538537be165f0de0554db9d70d8b411328e55d
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sat, 17 Feb 2018 12:23:11 +0100

Fix retweeted if

Diffstat:
Mtwitter/twitter.go | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/twitter/twitter.go b/twitter/twitter.go @@ -230,7 +230,12 @@ func (t *TwitterAPI) GetTweets(tweets []int64) ([]byte, error) { JT.CreatedAt = tweetTime.Format("02.01.2006") JT.Favorites = strconv.Itoa(t.FavoriteCount) JT.Retweets = strconv.Itoa(t.RetweetCount) - JT.Retweet = t.Retweeted + if t.RetweetedStatus != nil { + JT.Retweet = true + } else { + JT.Retweet = false + } + for _, i := range t.ExtendedEntities.Media { if i.Type == "photo" { JT.IMGUrls = append(JT.IMGUrls, i.Media_url_https)