This commit is contained in:
Aevann1 2021-10-18 03:26:30 +02:00
parent 28d616b8e1
commit 80d2571dff
7 changed files with 477 additions and 505 deletions

View file

@ -1,18 +1,16 @@
from os import environ
import re
import time
from urllib.parse import urlencode, urlparse, parse_qs
from flask import *
from sqlalchemy import *
from sqlalchemy.orm import relationship, deferred, lazyload
from files.__main__ import Base
from files.classes.votes import CommentVote
from files.helpers.const import AUTOPOLLER_ACCOUNT
from files.helpers.lazy import lazy
from files.helpers.const import SLURS
from files.__main__ import Base
from .flags import CommentFlag
from ..helpers.word_censor import censor_slurs
from os import environ
import time
from files.helpers.const import AUTOPOLLER_ACCOUNT
site = environ.get("DOMAIN").strip()
@ -300,7 +298,8 @@ class Comment(Base):
if not body: return ""
body = censor_slurs(body, v)
if not v or v.slurreplacer:
for s, r in SLURS.items(): body = body.replace(s, r)
if v and not v.oldreddit: body = body.replace("old.reddit.com", "reddit.com")
@ -326,7 +325,8 @@ class Comment(Base):
if not body: return ""
body = censor_slurs(body, v)
if not v or v.slurreplacer:
for s, r in SLURS.items(): body = body.replace(s, r)
if v and not v.oldreddit: body = body.replace("old.reddit.com", "reddit.com")