From 5dee67c2dafd4e5a5fbd707d8c95ab4addfbb161 Mon Sep 17 00:00:00 2001 From: Valentine Date: Wed, 21 Feb 2024 06:21:49 +0300 Subject: [PATCH] add following & followed by to profile --- profile.go | 2 ++ types.go | 1 + util.go | 2 ++ 3 files changed, 5 insertions(+) diff --git a/profile.go b/profile.go index a96e2fe..98e3517 100644 --- a/profile.go +++ b/profile.go @@ -34,6 +34,8 @@ type Profile struct { Username string Website string Sensitive bool + Following bool + FollowedBy bool } type user struct { diff --git a/types.go b/types.go index 3e96331..715f588 100644 --- a/types.go +++ b/types.go @@ -171,6 +171,7 @@ type ( } legacyUserV2 struct { + FollowedBy bool `json:"followed_by"` Following bool `json:"following"` CanDm bool `json:"can_dm"` CanMediaTag bool `json:"can_media_tag"` diff --git a/util.go b/util.go index 0ed2b1f..6912ee1 100644 --- a/util.go +++ b/util.go @@ -387,6 +387,8 @@ func parseProfileV2(user userResult) Profile { UserID: user.ID, Username: u.ScreenName, Sensitive: u.PossiblySensitive, + Following: u.Following, + FollowedBy: u.FollowedBy, } tm, err := time.Parse(time.RubyDate, u.CreatedAt)