fart
This commit is contained in:
parent
207b3c1980
commit
6c97156856
15 changed files with 48 additions and 23 deletions
|
@ -553,11 +553,6 @@ def edit_post(pid, v):
|
|||
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
|
||||
|
||||
if v.id == p.author_id:
|
||||
if int(time.time()) - p.created_utc > 60 * 3: p.edited_utc = int(time.time())
|
||||
g.db.add(p)
|
||||
|
||||
if not p.private and not p.ghost:
|
||||
notify_users = NOTIFY_USERS(f'{p.title} {p.body}', v)
|
||||
if notify_users:
|
||||
|
@ -565,6 +560,17 @@ def edit_post(pid, v):
|
|||
for x in notify_users:
|
||||
add_notif(cid, x)
|
||||
|
||||
if v.id == p.author_id:
|
||||
if int(time.time()) - p.created_utc > 60 * 3: p.edited_utc = int(time.time())
|
||||
g.db.add(p)
|
||||
else:
|
||||
ma=ModAction(
|
||||
kind="edit_post",
|
||||
user_id=v.id,
|
||||
target_submission_id=p.id
|
||||
)
|
||||
g.db.add(ma)
|
||||
|
||||
g.db.commit()
|
||||
|
||||
return redirect(p.permalink)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue