This commit is contained in:
Aevann1 2021-08-19 08:14:17 +02:00
parent b84d5a4abf
commit fa04506fd2
2 changed files with 4 additions and 3 deletions

View file

@ -914,14 +914,15 @@ def submit_post(v):
n = Notification(comment_id=c.id, user_id=v.id)
g.db.add(n)
g.db.flush()
send_message(f"https://{site}{new_post.permalink}")
v.post_count = v.submissions.filter_by(is_banned=False, deleted_utc=0).count()
g.db.add(v)
cache.delete_memoized(User.userpagelisting, v)
cache.delete_memoized(frontlist)
if "[changelog]" in new_post.title: cache.delete_memoized(changeloglist)
if "[changelog]" in new_post.title:
send_message(f"https://{site}{new_post.permalink}")
cache.delete_memoized(changeloglist)
if request.headers.get("Authorization"): return new_post.json
else: return redirect(new_post.permalink)