Skip to content

A platform for community discussion. Free, open, simple.

FIX: render_404 is not defined (#19769)

Joffrey JAFFEUXd464f1fc6213
diff --git a/plugins/chat/app/controllers/chat_controller.rb b/plugins/chat/app/controllers/chat_controller.rb
index 6b7d74d020b..9849ffc2909 100644
--- a/plugins/chat/app/controllers/chat_controller.rb
+++ b/plugins/chat/app/controllers/chat_controller.rb
@@ -288,8 +288,8 @@ class Chat::ChatController < Chat::ChatBaseController
end
def message_link
- return render_404 if @message.blank? || @message.deleted_at.present?
- return render_404 if @message.chat_channel.blank?
+ raise Discourse::NotFound if @message.blank? || @message.deleted_at.present?
+ raise Discourse::NotFound if @message.chat_channel.blank?
set_channel_and_chatable_with_access_check(chat_channel_id: @message.chat_channel_id)
render json:
success_json.merge(