From 62982c63d8e82838be14859d669d9ce4310caaff Mon Sep 17 00:00:00 2001 From: Noah Date: Tue, 19 Mar 2024 18:30:08 -0500 Subject: [PATCH] feat(feed): Increase number of activities fetched from the server --- feed.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/feed.go b/feed.go index 4274986..653d320 100644 --- a/feed.go +++ b/feed.go @@ -30,7 +30,7 @@ func getActivityFeed() []Activity { feed := []Activity{} for _, server := range config.servers { client := Servers[server.servername] - resp, err := http.Get(fmt.Sprintf("%s/api/v1/users/%s/activities/feeds?limit=10&page=1", + resp, err := http.Get(fmt.Sprintf("%s/api/v1/users/%s/activities/feeds?limit=15&page=1", server.url, server.username, )) @@ -52,17 +52,6 @@ func getActivityFeed() []Activity { fmt.Println("Error getting user: "+fmt.Sprint(err)) continue } - // repo, _, err := client.GetRepo( - // obj["repo"]. - // (map[string]interface{})["name"].(string), - // obj["repo"]. - // (map[string]interface{})["owner"]. - // (map[string]interface{})["login"].(string), - // ) - // if err != nil { - // fmt.Println("Failed to get repository: "+fmt.Sprint(err)) - // continue - // } var comment gitea.Comment if obj["comment"] != nil { raw_comment := obj["comment"].(map[string]interface{}) @@ -94,3 +83,5 @@ func getActivityFeed() []Activity { } return feed } + +