do notify jannies
parent
e84676cd50
commit
8ac49ae416
|
@ -303,7 +303,6 @@ def comment(v):
|
|||
execute_longpostbot(c, level, body, body_html, post_target, v)
|
||||
execute_zozbot(c, level, post_target, v)
|
||||
|
||||
if c.pinned != "Admin Note":
|
||||
notify_users = NOTIFY_USERS(body, v, ghost=c.ghost, obj=c, commenters_ping_post_id=commenters_ping_post_id)
|
||||
|
||||
if notify_users == 'everyone':
|
||||
|
@ -326,6 +325,9 @@ def comment(v):
|
|||
if v.shadowbanned or c.is_banned:
|
||||
notify_users = [x[0] for x in g.db.query(User.id).filter(User.id.in_(notify_users), User.admin_level >= PERMS['USER_SHADOWBAN']).all()]
|
||||
|
||||
if c.pinned == "Admin Note":
|
||||
notify_users = [x[0] for x in g.db.query(User.id).filter(User.id.in_(notify_users), User.admin_level >= PERMS['ADMIN_NOTES']).all()]
|
||||
|
||||
for x in notify_users:
|
||||
n = Notification(comment_id=c.id, user_id=x)
|
||||
g.db.add(n)
|
||||
|
@ -668,6 +670,9 @@ def edit_comment(cid, v):
|
|||
else:
|
||||
notify_users -= BOT_IDs
|
||||
|
||||
if c.pinned == "Admin Note":
|
||||
notify_users = [x[0] for x in g.db.query(User.id).filter(User.id.in_(notify_users), User.admin_level >= PERMS['ADMIN_NOTES']).all()]
|
||||
|
||||
for x in notify_users:
|
||||
notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=x).one_or_none()
|
||||
if not notif:
|
||||
|
|
Loading…
Reference in New Issue