From 43897cad9f07966553d76eb49a11b5363a4cc5e4 Mon Sep 17 00:00:00 2001 From: Valentine Date: Wed, 21 Feb 2024 06:33:06 +0300 Subject: [PATCH] add follows & followed by to legacyUser --- types.go | 2 ++ util.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/types.go b/types.go index 715f588..7a13c95 100644 --- a/types.go +++ b/types.go @@ -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 { diff --git a/util.go b/util.go index 6912ee1..0eda4be 100644 --- a/util.go +++ b/util.go @@ -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)