mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 22:57:16 +08:00
FIX: serializes interaction for direct messages (#29844)
Prior to this fix it would cause an error as we need to pass the user to get the title of the channel. This commit also adds a test for message interaction serializer.
This commit is contained in:
@ -173,6 +173,11 @@ Fabricator(:chat_reviewable_message, class_name: "Chat::ReviewableMessage") do
|
||||
reviewable_scores { |p| [Fabricate.build(:reviewable_score, reviewable_id: p[:id])] }
|
||||
end
|
||||
|
||||
Fabricator(:chat_message_interaction, class_name: "Chat::MessageInteraction") do
|
||||
message { Fabricate(:chat_message) }
|
||||
user { Fabricate(:user) }
|
||||
end
|
||||
|
||||
Fabricator(:direct_message, class_name: "Chat::DirectMessage") do
|
||||
users { [Fabricate(:user), Fabricate(:user)] }
|
||||
end
|
||||
|
Reference in New Issue
Block a user