enforce tier benefits

master
Aevann 2024-04-11 12:25:22 +02:00
parent f8127d9a70
commit 3f0d8c7438
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ def execute_snappy(post, v):
post_ping_group_count = len(list(group_mention_regex.finditer(post.body)))
if post.author.snappy_quotes:
if post.author.snappy_quotes and post.author.patron >= 5:
quotes = post.author.snappy_quotes.split("[para]")
body = random.choice(quotes).strip()
elif SITE_NAME == 'rDrama' and (v.post_count <= 3 or v.new_user):

View File

@ -151,7 +151,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, obj=None, followers_ping=Tr
criteria = (Notification.user_id == User.id, Notification.read == False)
keyword_users = g.db.query(User.id, User.keyword_notifs).outerjoin(Notification, and_(*criteria)).group_by(User.id, User.keyword_notifs).having(func.count(Notification.user_id) < 100).filter(User.keyword_notifs != None)
keyword_users = g.db.query(User.id, User.keyword_notifs).outerjoin(Notification, and_(*criteria)).group_by(User.id, User.keyword_notifs).having(func.count(Notification.user_id) < 100).filter(User.keyword_notifs != None, User.patron >= 5)
for uid, keyword_notifs in keyword_users:
for word in keyword_notifs.lower().split('\n'):