Skip to content

Commit

Permalink
FIX: critical posting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
merefield committed Jun 5, 2024
1 parent 9aa7bd0 commit 7f005cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/discourse_chatbot/post/post_evaluation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def trigger_response(submission)
prior_user_was_bot = false

if post.post_number > 1
last_other_posting_user_id = ::Post.where(topic_id: topic.id).order(created_at: :desc).limit(5).where.not(user_id: user.id).first.user_id
last_other_posting_user_id = ::Post.where(topic_id: topic.id).order(created_at: :desc).limit(5).where.not(user_id: user.id).first&.user_id
prior_user_was_bot = last_other_posting_user_id == bot_user.id

explicit_reply_to_bot = post.reply_to_user_id == bot_user.id
Expand Down
2 changes: 1 addition & 1 deletion plugin.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
# name: discourse-chatbot
# about: a plugin that allows you to have a conversation with a configurable chatbot in Discourse Chat, Topics and Private Messages
# version: 0.9.24
# version: 0.9.25
# authors: merefield
# url: https://github.com/merefield/discourse-chatbot

Expand Down

0 comments on commit 7f005cd

Please sign in to comment.