mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-03-09 02:40:50 +00:00
21 lines
557 B
Ruby
21 lines
557 B
Ruby
# frozen_string_literal: true
|
|
module DiscourseAI
|
|
module Sentiment
|
|
class EntryPoint
|
|
def inject_into(plugin)
|
|
require_relative "event_handler.rb"
|
|
require_relative "post_classifier.rb"
|
|
require_relative "jobs/regular/sentiment_classify_post.rb"
|
|
|
|
plugin.on(:post_created) do |post|
|
|
DiscourseAI::Sentiment::EventHandler.handle_post_async(post)
|
|
end
|
|
|
|
plugin.on(:post_edited) do |post|
|
|
DiscourseAI::Sentiment::EventHandler.handle_post_async(post)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|