mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-07 07:07:48 +00:00
Make gated subreddits accessible by treating them as quarantined (#722)
* Fix gated communities being unviewable by treating them as quarantined * Show restriction reason in quarantine template * Add `gated` checks for other requests
This commit is contained in:
parent
0b39d4f059
commit
eb07a2ce7c
5 changed files with 14 additions and 14 deletions
|
@ -210,9 +210,9 @@ pub async fn item(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
|
||||
// Process error.
|
||||
Err(msg) => {
|
||||
if msg == "quarantined" {
|
||||
if msg == "quarantined" || msg == "gated" {
|
||||
let sub = req.param("sub").unwrap_or_default();
|
||||
quarantine(req, sub)
|
||||
quarantine(req, sub, msg)
|
||||
} else {
|
||||
error(req, msg).await
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue