mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: Add missing user_id args for ChatMessage.cook (#19508)
In both ChatMessage#rebake! and in ChatMessageProcessor when we were calling ChatMessage.cook we were missing the user_id to cook with, which causes missed hashtag cooks because of missing permissions.
This commit is contained in:
10
plugins/chat/spec/lib/chat_message_processor_spec.rb
Normal file
10
plugins/chat/spec/lib/chat_message_processor_spec.rb
Normal file
@ -0,0 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe Chat::ChatMessageProcessor do
|
||||
fab!(:message) { Fabricate(:chat_message) }
|
||||
|
||||
it "cooks using the last_editor_id of the message" do
|
||||
ChatMessage.expects(:cook).with(message.message, user_id: message.last_editor_id)
|
||||
described_class.new(message)
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user