fix wrong autojanny comment count
parent
e3e7c4a8b6
commit
bb3c120e8c
|
@ -320,10 +320,13 @@ def comment(v:User):
|
|||
post_target.comment_count += 1
|
||||
g.db.add(post_target)
|
||||
|
||||
|
||||
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
|
||||
autojanny = g.db.get(User, AUTOJANNY_ID)
|
||||
autojanny.comment_count += 1
|
||||
g.db.add(autojanny)
|
||||
|
||||
execute_longpostbot(c, level, body, body_html, post_target, v)
|
||||
execute_zozbot(c, level, post_target, v)
|
||||
|
||||
|
|
|
@ -706,6 +706,10 @@ def submit_post(v:User, sub=None):
|
|||
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
|
||||
autojanny = g.db.get(User, AUTOJANNY_ID)
|
||||
autojanny.comment_count += 1
|
||||
g.db.add(autojanny)
|
||||
|
||||
if not p.private and not (p.sub and g.db.query(Exile.user_id).filter_by(user_id=SNAPPY_ID, sub=p.sub).one_or_none()):
|
||||
execute_snappy(p, v)
|
||||
|
||||
|
|
Loading…
Reference in New Issue