mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
do not alert on deleted posts
This commit is contained in:
parent
b7e7da766d
commit
6fab03b777
@ -2,8 +2,10 @@ module Jobs
|
||||
class PostAlert < Jobs::Base
|
||||
|
||||
def execute(args)
|
||||
post = Post.find(args[:post_id])
|
||||
PostAlerter.post_created(post)
|
||||
# maybe it was removed by the time we are making the post
|
||||
if post = Post.find_by(id: args[:post_id])
|
||||
PostAlerter.post_created(post)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user