Skip to content

Commit

Permalink
COMPATIBILITY: resolve issue with breaking change in Chat
Browse files Browse the repository at this point in the history
  • Loading branch information
merefield committed Oct 29, 2024
1 parent 97f0ea1 commit 1fcac67
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .discourse-compatibility
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
< v3.4.0.beta2: 97f0ea1349ceeb1502918ba60a870d98950050f3
3.2.0.beta4: 9f391e5193fead336d317d8f1a8a5c2fa5202663
8 changes: 5 additions & 3 deletions app/controllers/discourse_chatbot/chatbot_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ def start_bot_convo

if (last_chat && (over_quota && last_chat.message != I18n.t('chatbot.errors.overquota') || !over_quota && last_chat.message != I18n.t("chatbot.quick_access_kick_off.announcement"))) || last_chat.nil?
Chat::CreateMessage.call(
chat_channel_id: chat_channel_id,
guardian: guardian,
message: over_quota ? I18n.t('chatbot.errors.overquota') : kick_off_statement,
params: {
chat_channel_id: chat_channel_id,
message: over_quota ? I18n.t('chatbot.errors.overquota') : kick_off_statement
},
guardian: guardian
)
end

Expand Down
8 changes: 5 additions & 3 deletions lib/discourse_chatbot/message/message_reply_creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ def create
end

Chat::CreateMessage.call(
chat_channel_id: @topic_or_channel_id,
guardian: @guardian,
message: @message_body,
params: {
chat_channel_id: @topic_or_channel_id,
message: @message_body
},
guardian: @guardian
)
begin
presence = PresenceChannel.new("/chat-reply/#{@topic_or_channel_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: 1.3.1
# version: 1.3.2
# authors: merefield
# url: https://github.com/merefield/discourse-chatbot

Expand Down

0 comments on commit 1fcac67

Please sign in to comment.