remotes/1693045480750635534/spooky-22
Aevann1 2021-09-16 11:56:50 +02:00
parent f7f7101f71
commit 0db5cc0ada
3 changed files with 4 additions and 2 deletions

View File

@ -10,7 +10,6 @@ services:
- PYTHONPATH="/service"
- REDIS_URL=redis://redis
- DATABASE_URL=postgresql://postgres@postgres:5432/postgres
- DATABASE_CONNECTION_POOL_URL=postgresql://postgres@postgres:5432/postgres
- MASTER_KEY=${MASTER_KEY:-KTVciAUQFpFh2WdJ/oiHJlxl6FvzRZp8kYzAAv3l2OA=}
- DOMAIN=localhost
- SITE_NAME=Drama

1
env
View File

@ -1,7 +1,6 @@
export PYTHONPATH="/service"
export REDIS_URL="redis://redis"
export DATABASE_URL="postgresql://postgres@postgres:5432/postgres"
export DATABASE_CONNECTION_POOL_URL="postgresql://postgres@postgres:5432/postgres"
export MASTER_KEY="-KTVciAUQFpFh2WdJ/oiHJlxl6FvzRZp8kYzAAv3l2OA="
export DOMAIN="localhost"
export SITE_NAME="Drama"

View File

@ -112,6 +112,10 @@ def post_id(pid, anything=None, v=None):
blocked.c.id,
)
shadowbanned = g.db.query(User.id).filter(User.shadowbanned == False).subquery()
comments = comments.filter(Comment.author_id.notin_(shadowbanned))
if not (v and v.shadowbanned) and not (v and v.admin_level == 6):
comments = comments.join(Comment.author).filter(User.shadowbanned == False)