BUGFIX: user is missing when loading their user profile, try to scrape them first
This commit is contained in:
parent
aaab11b1d0
commit
e5597ceac0
@ -37,10 +37,17 @@ func (app *Application) UserFeed(w http.ResponseWriter, r *http.Request) {
|
||||
parts := strings.Split(strings.Trim(r.URL.Path, "/"), "/")
|
||||
|
||||
user, err := app.Profile.GetUserByHandle(scraper.UserHandle(parts[0]))
|
||||
if err != nil {
|
||||
if !app.IsScrapingDisabled {
|
||||
user, err = scraper.GetUser(scraper.UserHandle(parts[0]))
|
||||
}
|
||||
if err != nil {
|
||||
app.error_404(w)
|
||||
return
|
||||
}
|
||||
app.Profile.SaveUser(&user)
|
||||
app.Profile.DownloadUserContentFor(&user)
|
||||
}
|
||||
|
||||
if r.URL.Query().Has("scrape") {
|
||||
if app.IsScrapingDisabled {
|
||||
|
Loading…
x
Reference in New Issue
Block a user