From e0f194a7d12f79df2a285d563efe2899d4386c04 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Tue, 12 Jul 2022 14:37:51 -0400 Subject: [PATCH] allow following restricted subreddits too --- internal/reddit/types.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/reddit/types.go b/internal/reddit/types.go index 715f3fd..2d9124b 100644 --- a/internal/reddit/types.go +++ b/internal/reddit/types.go @@ -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 }