fix: message_type inconsistency across message end points (#10108)

The `before_type_cast` method sometimes returns a string for
`message_type`, creating inconsistencies in different payloads. This
pull request will remove all `before_type_cast` usage and replace it
with `to_i` methods.
This commit is contained in:
Muhsin Keloth
2024-09-16 16:14:35 +05:30
committed by GitHub
parent b9ff164041
commit 05b8486538
13 changed files with 40 additions and 22 deletions

View File

@@ -79,7 +79,7 @@ RSpec.describe Message do
external_source_ids: message.external_source_ids,
id: message.id,
inbox_id: message.inbox_id,
message_type: message.message_type_before_type_cast,
message_type: message.message_type.to_i,
private: message.private,
processed_message_content: message.processed_message_content,
sender_id: message.sender_id,