forked from rDrama/rDrama
wut
parent
35ec2a7712
commit
1da0d95830
|
@ -574,18 +574,20 @@ def edit_post(pid, v):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (title != p.title or body != p.body) and v.id == p.author_id:
|
if title != p.title or body != p.body:
|
||||||
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:
|
if v.id == p.author_id:
|
||||||
notify_users = NOTIFY_USERS(f'{title} {body}', v)
|
if int(time.time()) - p.created_utc > 60 * 3: p.edited_utc = int(time.time())
|
||||||
if notify_users:
|
g.db.add(p)
|
||||||
cid = notif_comment2(p)
|
|
||||||
for x in notify_users:
|
|
||||||
add_notif(cid, x)
|
|
||||||
|
|
||||||
g.db.commit()
|
if not p.private and not p.ghost:
|
||||||
|
notify_users = NOTIFY_USERS(f'{title} {body}', v)
|
||||||
|
if notify_users:
|
||||||
|
cid = notif_comment2(p)
|
||||||
|
for x in notify_users:
|
||||||
|
add_notif(cid, x)
|
||||||
|
|
||||||
|
g.db.commit()
|
||||||
|
|
||||||
return redirect(p.permalink)
|
return redirect(p.permalink)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue