♻️ Use trends statues api instead of public timeline in mastodon fetching

This commit is contained in:
LittleSheep 2025-03-13 13:11:37 +08:00
parent 5f58a85892
commit 32f2e3f1ed

View File

@ -59,7 +59,7 @@ func (v MastodonPost) ToFediversePost() models.FediversePost {
}
func FetchTimeline(server string, limit int) ([]MastodonPost, error) {
url := fmt.Sprintf("%s/api/v1/timelines/public?limit=%d", server, limit)
url := fmt.Sprintf("%s/api/v1/trends/statuses?limit=%d", server, limit)
log.Debug().Str("url", url).Msg("Fetching mastodon timeline...")
resp, err := http.Get(url)