Skip to content

Commit

Permalink
Merge pull request #97 from merefield/add_nil_check_for_url_check
Browse files Browse the repository at this point in the history
FIX: don't process check legality of urls for blank messages
  • Loading branch information
merefield authored Jun 10, 2024
2 parents 7033697 + 49cc9d8 commit 09ee1f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/discourse_chatbot/bots/open_ai_bot_rag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ def call_function(func_name, args_str, opts)
end

def legal_urls?(res, post_ids_found, topic_ids_found)
return true if res.blank?

post_url_regex = %r{\/t/[^/]+/(\d+)/(\d+)}
topic_url_regex = %r{\/t/[^/]+/(\d+)(?!\d|\/)}
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.26
# version: 0.9.27
# authors: merefield
# url: https://github.com/merefield/discourse-chatbot

Expand Down

0 comments on commit 09ee1f4

Please sign in to comment.