allow following restricted subreddits too

This commit is contained in:
Andre Medeiros 2022-07-12 14:37:51 -04:00
parent f0c93a8bb9
commit e0f194a7d1

View file

@ -172,7 +172,9 @@ func NewSubredditResponse(val *fastjson.Value) interface{} {
sr.ID = string(data.GetStringBytes("id")) sr.ID = string(data.GetStringBytes("id"))
sr.Name = string(data.GetStringBytes("display_name")) sr.Name = string(data.GetStringBytes("display_name"))
sr.Quarantined = data.GetBool("quarantine") sr.Quarantined = data.GetBool("quarantine")
sr.Public = string(data.GetStringBytes("subreddit_type")) == "public"
sr_type := string(data.GetStringBytes("subreddit_type"))
sr.Public = sr_type == "public" || sr_type == "restricted"
return sr return sr
} }