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:
Joffrey JAFFEUX
2024-11-20 11:26:12 +01:00
committed by GitHub
parent 67ce111861
commit 2fb811a335
4 changed files with 161 additions and 1 deletions

View File

@ -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