forked from MarseyWorld/MarseyWorld
fdsfsd
parent
4135990c84
commit
32cbc010e4
|
@ -4,7 +4,7 @@ from sqlalchemy.orm import relationship, deferred
|
|||
import re, random
|
||||
from urllib.parse import urlparse
|
||||
from files.helpers.lazy import lazy
|
||||
from files.helpers.const import SLURS
|
||||
from files.helpers.const import SLURS, AUTOPOLLER_ACCOUNT
|
||||
from files.__main__ import Base
|
||||
from .flags import Flag
|
||||
from os import environ
|
||||
|
@ -74,7 +74,7 @@ class Submission(Base):
|
|||
@property
|
||||
@lazy
|
||||
def options(self):
|
||||
return self.comments.filter_by(author_id = 3369)
|
||||
return self.comments.filter_by(author_id = AUTOPOLLER_ACCOUNT)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
|
@ -165,6 +165,7 @@ NOTIFICATIONS_ACCOUNT = 1046
|
|||
if site == "pcmemes.net": AUTOJANNY_ACCOUNT = 1050
|
||||
else: AUTOJANNY_ACCOUNT = 2360
|
||||
LONGPOSTBOT_ACCOUNT = 1832
|
||||
AUTOPOLLER_ACCOUNT = 6176
|
||||
|
||||
PUSHER_INSTANCE_ID = '02ddcc80-b8db-42be-9022-44c546b4dce6'
|
||||
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
|
||||
|
|
|
@ -124,7 +124,7 @@ def post_id(pid, anything=None, v=None):
|
|||
|
||||
comments=comments.filter(
|
||||
Comment.parent_submission == post.id,
|
||||
Comment.author_id != 3369,
|
||||
Comment.author_id != AUTOPOLLER_ACCOUNT,
|
||||
).join(
|
||||
votes,
|
||||
votes.c.comment_id == Comment.id,
|
||||
|
@ -162,7 +162,7 @@ def post_id(pid, anything=None, v=None):
|
|||
|
||||
else:
|
||||
shadowbanned = [x[0] for x in g.db.query(User.id).options(lazyload('*')).filter(User.shadowbanned != None).all()]
|
||||
comments = g.db.query(Comment).filter(Comment.parent_submission == post.id, Comment.author_id != 3369, Comment.author_id.notin_(shadowbanned))
|
||||
comments = g.db.query(Comment).filter(Comment.parent_submission == post.id, Comment.author_id != AUTOPOLLER_ACCOUNT, Comment.author_id.notin_(shadowbanned))
|
||||
|
||||
if sort == "new":
|
||||
comments = comments.order_by(Comment.created_utc.desc())
|
||||
|
@ -816,7 +816,7 @@ def submit_post(v):
|
|||
g.db.flush()
|
||||
|
||||
for option in options:
|
||||
c = Comment(author_id=3369,
|
||||
c = Comment(author_id=AUTOPOLLER_ACCOUNT,
|
||||
parent_submission=new_post.id,
|
||||
level=1,
|
||||
body=option,
|
||||
|
|
Loading…
Reference in New Issue