mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 11:33:44 +08:00
849827841f
This reverts commit c51c80466c
.
There is a conditional in post jobs enqueuer that only enqueues the job
for non-PM posts.
21 lines
495 B
Ruby
21 lines
495 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Jobs
|
|
class PostUpdateTopicTrackingState < ::Jobs::Base
|
|
|
|
def execute(args)
|
|
post = Post.find_by(id: args[:post_id])
|
|
|
|
if post && post.topic
|
|
TopicTrackingState.publish_unmuted(post.topic)
|
|
if post.post_number > 1
|
|
TopicTrackingState.publish_muted(post.topic)
|
|
TopicTrackingState.publish_unread(post)
|
|
end
|
|
TopicTrackingState.publish_latest(post.topic, post.whisper?)
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|