add follows & followed by to legacyUser

This commit is contained in:
Valentine 2024-02-21 06:33:06 +03:00
parent 4f710ab596
commit 43897cad9f
2 changed files with 4 additions and 0 deletions

View file

@ -168,6 +168,8 @@ type (
ScreenName string `json:"screen_name"`
StatusesCount int `json:"statuses_count"`
Verified bool `json:"verified"`
FollowedBy bool `json:"followed_by"`
Following bool `json:"following"`
}
legacyUserV2 struct {

View file

@ -352,6 +352,8 @@ func parseProfile(user legacyUser) Profile {
URL: "https://twitter.com/" + user.ScreenName,
UserID: user.IDStr,
Username: user.ScreenName,
FollowedBy: user.FollowedBy,
Following: user.Following,
}
tm, err := time.Parse(time.RubyDate, user.CreatedAt)