enforce tier benefits
parent
f8127d9a70
commit
3f0d8c7438
|
@ -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):
|
||||
|
|
|
@ -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'):
|
||||
|
|
Loading…
Reference in New Issue