forked from rDrama/rDrama
master
parent
b9453bac03
commit
53c495d25f
|
@ -455,6 +455,10 @@ def hole_pin(v, pid):
|
|||
p.hole_pinned = v.username
|
||||
g.db.add(p)
|
||||
|
||||
if v.id != p.author_id:
|
||||
message = f"@{v.username} (Mod) has pinned your [post]({p.shortlink}) in /h/{p.sub}"
|
||||
send_repeatable_notification(p.author_id, message)
|
||||
|
||||
return {"message": f"Post pinned to /h/{p.sub}"}
|
||||
|
||||
@app.post("/hole_unpin/<pid>")
|
||||
|
@ -469,4 +473,8 @@ def hole_unpin(v, pid):
|
|||
p.hole_pinned = None
|
||||
g.db.add(p)
|
||||
|
||||
return {"message": f"Post unpinned from /h/{p.sub}"}
|
||||
if v.id != p.author_id:
|
||||
message = f"@{v.username} (Mod) has unpinned your [post]({p.shortlink}) in /h/{p.sub}"
|
||||
send_repeatable_notification(p.author_id, message)
|
||||
|
||||
return {"message": f"Post unpinned from /h/{p.sub}"}
|
Loading…
Reference in New Issue