forked from rDrama/rDrama
consistency in post linking
parent
bf0a3a4dab
commit
981d921e4e
|
@ -166,7 +166,7 @@ def execute_snappy(post, v):
|
||||||
if AWARDS["glowie"]['cosmetic']:
|
if AWARDS["glowie"]['cosmetic']:
|
||||||
post.author.pay_account('coins', awarded_coins)
|
post.author.pay_account('coins', awarded_coins)
|
||||||
|
|
||||||
msg = f"@Snappy has given your [post]({post.shortlink}) the {AWARDS['glowie']['title']} Award"
|
msg = f"@Snappy has given [{post.title}]({post.shortlink}) the {AWARDS['glowie']['title']} Award"
|
||||||
if awarded_coins > 0:
|
if awarded_coins > 0:
|
||||||
msg += f" and you have received {awarded_coins} coins as a result"
|
msg += f" and you have received {awarded_coins} coins as a result"
|
||||||
msg += "!"
|
msg += "!"
|
||||||
|
|
|
@ -1494,7 +1494,7 @@ def sticky_post(post_id, v):
|
||||||
pin_time = 'for 1 hour'
|
pin_time = 'for 1 hour'
|
||||||
code = 200
|
code = 200
|
||||||
if v.id != post.author_id:
|
if v.id != post.author_id:
|
||||||
send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has pinned [{post.title}](/post/{post_id})")
|
send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has pinned [{post.title}]({post.shortlink})")
|
||||||
else:
|
else:
|
||||||
if pins >= PIN_LIMIT + 1:
|
if pins >= PIN_LIMIT + 1:
|
||||||
abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!")
|
abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!")
|
||||||
|
@ -1543,7 +1543,7 @@ def unsticky_post(post_id, v):
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
if v.id != post.author_id:
|
if v.id != post.author_id:
|
||||||
send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has unpinned [{post.title}](/post/{post_id})")
|
send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has unpinned [{post.title}]({post.shortlink})")
|
||||||
|
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
return {"message": "Post unpinned!"}
|
return {"message": "Post unpinned!"}
|
||||||
|
|
Loading…
Reference in New Issue