add user's full name

This commit is contained in:
windowsdeveloperwannabe 2023-05-10 05:05:07 -07:00
parent 5081b46f68
commit 21d595ff42
3 changed files with 6 additions and 0 deletions

View file

@ -155,9 +155,11 @@ type timeline struct {
func (timeline *timeline) parseTweet(id string) *Tweet {
if tweet, ok := timeline.GlobalObjects.Tweets[id]; ok {
username := timeline.GlobalObjects.Users[tweet.UserIDStr].ScreenName
name := timeline.GlobalObjects.Users[tweet.UserIDStr].Name
tw := &Tweet{
ID: id,
Likes: tweet.FavoriteCount,
Name: name,
PermanentURL: fmt.Sprintf("https://twitter.com/%s/status/%s", username, id),
Replies: tweet.ReplyCount,
Retweets: tweet.RetweetCount,