forked from MarseyWorld/MarseyWorld
more detailed pin/unpin messages
parent
cc5b476f3c
commit
0302270e16
|
@ -1239,7 +1239,7 @@ def sticky_post(post_id, v):
|
|||
g.db.add(ma)
|
||||
|
||||
if v.id != post.author_id:
|
||||
send_repeatable_notification(post.author_id, f"@{v.username} has pinned your [post](/post/{post_id})!")
|
||||
send_repeatable_notification(post.author_id, f"@{v.username} has pinned [{post.title}](/post/{post_id})!")
|
||||
|
||||
cache.delete_memoized(frontlist)
|
||||
return {"message": "Post pinned!"}
|
||||
|
@ -1264,7 +1264,7 @@ def unsticky_post(post_id, v):
|
|||
g.db.add(ma)
|
||||
|
||||
if v.id != post.author_id:
|
||||
send_repeatable_notification(post.author_id, f"@{v.username} has unpinned your [post](/post/{post_id})!")
|
||||
send_repeatable_notification(post.author_id, f"@{v.username} has unpinned [{post.title}](/post/{post_id})!")
|
||||
|
||||
cache.delete_memoized(frontlist)
|
||||
return {"message": "Post unpinned!"}
|
||||
|
|
|
@ -519,7 +519,7 @@ def hole_pin(v, pid):
|
|||
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}"
|
||||
message = f"@{v.username} (Mod) has pinned [{p.title}]({p.shortlink}) in /h/{p.sub}"
|
||||
send_repeatable_notification(p.author_id, message)
|
||||
|
||||
return {"message": f"Post pinned to /h/{p.sub} successfully!"}
|
||||
|
@ -537,7 +537,7 @@ def hole_unpin(v, pid):
|
|||
g.db.add(p)
|
||||
|
||||
if v.id != p.author_id:
|
||||
message = f"@{v.username} (Mod) has unpinned your [post]({p.shortlink}) in /h/{p.sub}"
|
||||
message = f"@{v.username} (Mod) has unpinned [{p.title}]({p.shortlink}) in /h/{p.sub}"
|
||||
send_repeatable_notification(p.author_id, message)
|
||||
|
||||
return {"message": f"Post unpinned from /h/{p.sub} successfully!"}
|
||||
|
|
Loading…
Reference in New Issue