Skip to content

Commit d2b4a2f

Browse files
committed
fix: twitter user not containing id_str
1 parent 42aac13 commit d2b4a2f

3 files changed

Lines changed: 25 additions & 24 deletions

File tree

bluesky/blueskyapi.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ func AuthorTTB(author User) *bridge.TwitterUser {
600600
URL: "",
601601
UtcOffset: nil,
602602
ID: bridge.BlueSkyToTwitterID(author.DID),
603+
IDStr: bridge.BlueSkyToTwitterID(author.DID).String(),
603604
ProfileUseBackgroundImage: false,
604605
ListedCount: 0,
605606
ProfileTextColor: "000000",

bridge/bridge.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -85,29 +85,29 @@ type TwitterUser struct {
8585
CreatedAt string `json:"created_at" xml:"created_at"`
8686
ProfileImageURL string `json:"profile_image_url" xml:"profile_image_url"`
8787
// ProfileImageURLHttps string `json:"profile_image_url_https" xml:"profile_image_url_https"`
88-
Location string `json:"location" xml:"location"`
89-
ProfileLinkColor string `json:"profile_link_color" xml:"profile_link_color"`
90-
FollowRequestSent bool `json:"follow_request_sent" xml:"follow_request_sent"`
91-
URL string `json:"url" xml:"url"`
92-
FavouritesCount int `json:"favourites_count" xml:"favourites_count"`
93-
ContributorsEnabled bool `json:"contributors_enabled" xml:"contributors_enabled"`
94-
UtcOffset *int `json:"utc_offset" xml:"utc_offset"`
95-
ID *big.Int `json:"id" xml:"id"`
96-
// IDStr string `json:"id_str" xml:"id_str"`
97-
ProfileUseBackgroundImage bool `json:"profile_use_background_image" xml:"profile_use_background_image"`
98-
ProfileTextColor string `json:"profile_text_color" xml:"profile_text_color"`
99-
Protected bool `json:"protected" xml:"protected"`
100-
FollowersCount int `json:"followers_count" xml:"followers_count"`
101-
Lang string `json:"lang" xml:"lang"`
102-
Notifications *bool `json:"notifications" xml:"notifications"`
103-
TimeZone *string `json:"time_zone" xml:"time_zone"`
104-
Verified bool `json:"verified" xml:"verified"`
105-
ProfileBackgroundColor string `json:"profile_background_color" xml:"profile_background_color"`
106-
GeoEnabled bool `json:"geo_enabled" xml:"geo_enabled"`
107-
Description string `json:"description" xml:"description"`
108-
FriendsCount int `json:"friends_count" xml:"friends_count"`
109-
StatusesCount int `json:"statuses_count" xml:"statuses_count"`
110-
ProfileBackgroundImageURL string `json:"profile_background_image_url" xml:"profile_background_image_url"`
88+
Location string `json:"location" xml:"location"`
89+
ProfileLinkColor string `json:"profile_link_color" xml:"profile_link_color"`
90+
FollowRequestSent bool `json:"follow_request_sent" xml:"follow_request_sent"`
91+
URL string `json:"url" xml:"url"`
92+
FavouritesCount int `json:"favourites_count" xml:"favourites_count"`
93+
ContributorsEnabled bool `json:"contributors_enabled" xml:"contributors_enabled"`
94+
UtcOffset *int `json:"utc_offset" xml:"utc_offset"`
95+
ID *big.Int `json:"id" xml:"id"`
96+
IDStr string `json:"id_str" xml:"id_str"`
97+
ProfileUseBackgroundImage bool `json:"profile_use_background_image" xml:"profile_use_background_image"`
98+
ProfileTextColor string `json:"profile_text_color" xml:"profile_text_color"`
99+
Protected bool `json:"protected" xml:"protected"`
100+
FollowersCount int `json:"followers_count" xml:"followers_count"`
101+
Lang string `json:"lang" xml:"lang"`
102+
Notifications *bool `json:"notifications" xml:"notifications"`
103+
TimeZone *string `json:"time_zone" xml:"time_zone"`
104+
Verified bool `json:"verified" xml:"verified"`
105+
ProfileBackgroundColor string `json:"profile_background_color" xml:"profile_background_color"`
106+
GeoEnabled bool `json:"geo_enabled" xml:"geo_enabled"`
107+
Description string `json:"description" xml:"description"`
108+
FriendsCount int `json:"friends_count" xml:"friends_count"`
109+
StatusesCount int `json:"statuses_count" xml:"statuses_count"`
110+
ProfileBackgroundImageURL string `json:"profile_background_image_url" xml:"profile_background_image_url"`
111111
// ProfileBackgroundImageURLHttps string `json:"profile_background_image_url_https" xml:"profile_background_image_url_https"`
112112
Following *bool `json:"following" xml:"following"`
113113
ScreenName string `json:"screen_name" xml:"screen_name"`

twitterv1/post_viewing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ func GetUserInfoFromTweetData(tweet blueskyapi.Post) bridge.TwitterUser {
425425
UtcOffset: nil,
426426
IsTranslator: false,
427427
ID: bridge.BlueSkyToTwitterID(tweet.URI),
428-
// IDStr: bridge.BlueSkyToTwitterID(tweet.URI).String(),
428+
IDStr: bridge.BlueSkyToTwitterID(tweet.URI).String(),
429429
ProfileUseBackgroundImage: false,
430430
ProfileTextColor: "333333",
431431
Protected: false,

0 commit comments

Comments
 (0)