Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ignore forum posts stored with zero id
  • Loading branch information
ccbrown committed Sep 3, 2018
commit 4e3f20e7f6b34af7d00463bbfdfe09c1e39d9104
6 changes: 4 additions & 2 deletions server/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ func (db *Database) Activity(start string, count int, filter func(Activity) bool
if post.Host == "" {
post.Host = "www.pathofexile.com"
}
activity = post
if post.Id != 0 {
activity = post
}
case RedditCommentType:
comment := &RedditComment{}
err := json.Unmarshal(v, comment)
Expand All @@ -116,7 +118,7 @@ func (db *Database) Activity(start string, count int, filter func(Activity) bool
}
activity = post
}
if filter == nil || filter(activity) {
if activity != nil && (filter == nil || filter(activity)) {
ret = append(ret, activity)
next = base64.RawURLEncoding.EncodeToString(k)
}
Expand Down