forked from rDrama/rDrama
1
0
Fork 0

more detailed pin/unpin messages

master
Aevann1 2022-09-13 11:01:30 +02:00
parent cc5b476f3c
commit 0302270e16
2 changed files with 4 additions and 4 deletions

View File

@ -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!"}

View File

@ -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!"}