Skip to content

Commit

Permalink
correct spec and implementation to only bypass reply if not mentioned
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Mar 3, 2025
1 parent 83614eb commit 099e5c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ai_bot/playground.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ def self.schedule_reply(post)
bot_user ||= User.find_by(id: mentioned[:user_id]) if mentioned
end

# in the past we would have an edge case where we would not reply on a mention if it was
# also a reply this just causes confusion
if !mentioned && bot_user && post.reply_to_post_number && !post.reply_to_post.user&.bot?
# replying to a non-bot user
return
end

if bot_user
topic_persona_id = post.topic.custom_fields["ai_persona_id"]
Expand Down

0 comments on commit 099e5c9

Please sign in to comment.