From eec02fef00276dbb06eed2d56fb170731678772a Mon Sep 17 00:00:00 2001 From: Alessio Date: Sun, 2 Feb 2025 20:02:26 -0800 Subject: [PATCH] On manually rescraping a user feed, update the user and download their content too --- internal/webserver/handler_user_feed.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/webserver/handler_user_feed.go b/internal/webserver/handler_user_feed.go index 9ac2f48..a24e4e0 100644 --- a/internal/webserver/handler_user_feed.go +++ b/internal/webserver/handler_user_feed.go @@ -46,6 +46,12 @@ func (app *Application) UserFeed(w http.ResponseWriter, r *http.Request) { return } + // Update the user themself + user, err = app.API.GetUser(scraper.UserHandle(parts[0])) + panic_if(err) + panic_if(app.Profile.SaveUser(&user)) // TODO: handle conflicting users + panic_if(app.Profile.DownloadUserContentFor(&user, &app.API)) + if len(parts) == 1 { // The URL is just the user handle // Run scraper trove, err := app.API.GetUserFeed(user.ID, 50) // TODO: parameterizable