mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-21 19:37:41 +00:00
allow following restricted subreddits too
This commit is contained in:
parent
f0c93a8bb9
commit
e0f194a7d1
1 changed files with 3 additions and 1 deletions
|
@ -172,7 +172,9 @@ func NewSubredditResponse(val *fastjson.Value) interface{} {
|
|||
sr.ID = string(data.GetStringBytes("id"))
|
||||
sr.Name = string(data.GetStringBytes("display_name"))
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue