From afe1f1c4af079ff564c67552a4e559409712c11b Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Thu, 8 Jun 2017 04:48:49 -0400 Subject: [PATCH] Fix 500 in public activity page (#1901) --- routers/user/home.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/routers/user/home.go b/routers/user/home.go index 7f6396ebd1b..9ff03cf04f2 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -55,9 +55,13 @@ func getDashboardContextUser(ctx *context.Context) *models.User { // retrieveFeeds loads feeds for the specified user func retrieveFeeds(ctx *context.Context, user *models.User, includePrivate, isProfile bool) { + var requestingID int64 + if ctx.User != nil { + requestingID = ctx.User.ID + } actions, err := models.GetFeeds(models.GetFeedsOptions{ RequestedUser: user, - RequestingUserID: ctx.User.ID, + RequestingUserID: requestingID, IncludePrivate: includePrivate, OnlyPerformedBy: isProfile, })