Skip to content

Commit

Permalink
add following & followed by to profile
Browse files Browse the repository at this point in the history
  • Loading branch information
imperatrona committed Feb 21, 2024
1 parent cf6de78 commit 5dee67c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ type Profile struct {
Username string
Website string
Sensitive bool
Following bool
FollowedBy bool
}

type user struct {
Expand Down
1 change: 1 addition & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 2 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5dee67c

Please sign in to comment.