forked from MarseyWorld/MarseyWorld
minor tweak to avoid double-notifying ppl
parent
423ad25d2a
commit
afdec9a5a9
|
@ -1216,6 +1216,8 @@ def sticky_post(post_id, v):
|
|||
post.stickied_utc = int(time.time()) + 3600
|
||||
pin_time = 'for 1 hour'
|
||||
code = 200
|
||||
if v.id != post.author_id:
|
||||
send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})!")
|
||||
else:
|
||||
post.stickied_utc = None
|
||||
pin_time = 'permanently'
|
||||
|
@ -1233,9 +1235,6 @@ 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} (Admin) has pinned [{post.title}](/post/{post_id}) {pin_time}!")
|
||||
|
||||
cache.delete_memoized(frontlist)
|
||||
|
||||
return {"message": f"Post pinned {pin_time}!"}, code
|
||||
|
|
Loading…
Reference in New Issue