forked from rDrama/rDrama
exclude KissingerFanBoyNoCarp and CDO from hole and group notifs
parent
b982491605
commit
2b1a030171
|
@ -58,7 +58,8 @@ def create_group(v):
|
||||||
text_html = sanitize(text, blackjack="notification")
|
text_html = sanitize(text, blackjack="notification")
|
||||||
cid = create_comment(text_html)
|
cid = create_comment(text_html)
|
||||||
t = time.time() - 604800
|
t = time.time() - 604800
|
||||||
notified_users = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_HOLE_CREATION'], User.id != v.id, User.last_active > t)]
|
excluded_ids = (v.id, 6289, 21238)
|
||||||
|
notified_users = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_HOLE_CREATION'], User.last_active > t, User.id.notin_(excluded_ids))]
|
||||||
for uid in notified_users:
|
for uid in notified_users:
|
||||||
add_notif(cid, uid, text, check_existing=False)
|
add_notif(cid, uid, text, check_existing=False)
|
||||||
|
|
||||||
|
|
|
@ -393,7 +393,8 @@ def create_sub2(v):
|
||||||
text_html = sanitize(text, blackjack="notification")
|
text_html = sanitize(text, blackjack="notification")
|
||||||
cid = create_comment(text_html)
|
cid = create_comment(text_html)
|
||||||
t = time.time() - 604800
|
t = time.time() - 604800
|
||||||
notified_users = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_HOLE_CREATION'], User.id != v.id, User.last_active > t)]
|
excluded_ids = (v.id, 6289, 21238)
|
||||||
|
notified_users = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_HOLE_CREATION'], User.last_active > t, User.id.notin_(excluded_ids))]
|
||||||
for uid in notified_users:
|
for uid in notified_users:
|
||||||
add_notif(cid, uid, text, check_existing=False)
|
add_notif(cid, uid, text, check_existing=False)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue