Sha256: aabc7c8304f28ee72c67005322b9b977eed6c629aa2676ab1ddb0ad6fa913460

Contents?: true

Size: 359 Bytes

Versions: 24

Compression:

Stored size: 359 Bytes

Contents

# frozen_string_literal: true

module Thredded
  class AutoFollowAndNotifyJob < ::ActiveJob::Base
    queue_as :default

    def perform(post_id)
      post = Thredded::Post.find_by(id: post_id)
      return if post.nil? || post.postable.nil?

      Thredded::AutofollowUsers.new(post).run
      Thredded::NotifyFollowingUsers.new(post).run
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
thredded-1.1.0 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-1.0.1 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-1.0.0 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.16 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.15 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.14 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.13 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.12 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.11 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.10 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.9 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.8 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.7 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.6 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.5 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.4 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.3 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.1 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.16.0 app/jobs/thredded/auto_follow_and_notify_job.rb
thredded-0.15.5 app/jobs/thredded/auto_follow_and_notify_job.rb