Skip to content

Commit ad1fe1c

Browse files
committed
feat: change post source when account is from bridgy fed
1 parent df8fc4a commit ad1fe1c

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

twitterv1/post_viewing.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,16 @@ func TranslatePostToTweet(tweet blueskyapi.Post, replyMsgBskyURI string, replyUs
676676
return &idStr
677677
}(),
678678
// InReplyToScreenName: &tweet.Author.DisplayName,
679-
User: *author,
680-
Source: "Bluesky",
679+
User: *author,
680+
Source: func() string {
681+
// small lil easter egg, if the account is bridged thru bridgy fed, we change the source to mastodon.
682+
// We can check this if the account ends with .ap.brid.gy
683+
if strings.HasSuffix(tweet.Author.Handle, ".ap.brid.gy") {
684+
return "Mastodon"
685+
} else {
686+
return "Bluesky"
687+
}
688+
}(),
681689
InReplyToStatusID: func() *int64 {
682690
if replyMsgBskyURI == "" || replyUserBskyId == "" {
683691
return nil

0 commit comments

Comments
 (0)