Skip to content

Commit afe1f1c

Browse files
ethantkoenigappleboy
authored andcommitted
Fix 500 in public activity page (#1901)
1 parent 9ddc35e commit afe1f1c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

routers/user/home.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ func getDashboardContextUser(ctx *context.Context) *models.User {
5555

5656
// retrieveFeeds loads feeds for the specified user
5757
func retrieveFeeds(ctx *context.Context, user *models.User, includePrivate, isProfile bool) {
58+
var requestingID int64
59+
if ctx.User != nil {
60+
requestingID = ctx.User.ID
61+
}
5862
actions, err := models.GetFeeds(models.GetFeedsOptions{
5963
RequestedUser: user,
60-
RequestingUserID: ctx.User.ID,
64+
RequestingUserID: requestingID,
6165
IncludePrivate: includePrivate,
6266
OnlyPerformedBy: isProfile,
6367
})

0 commit comments

Comments
 (0)