Merge pull request #7519 from vector-im/bugfix/fre/unencrypted_media_event_json_type

Fix bad content types when sending unencrypted media event with additional content data
This commit is contained in:
Florian Renaud 2022-11-04 10:40:18 +01:00 committed by GitHub
commit ac0d823c88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/7519.bugfix Normal file
View file

@ -0,0 +1 @@
Voice Broadcast - Fix error on voice messages in unencrypted rooms

View file

@ -408,7 +408,7 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
newAttachmentAttributes: NewAttachmentAttributes
) {
localEchoRepository.updateEcho(eventId) { _, event ->
val content: Content? = event.asDomain().content
val content: Content? = event.asDomain(castJsonNumbers = true).content
val messageContent: MessageContent? = content.toModel()
// Retrieve potential additional content from the original event
val additionalContent = content.orEmpty() - messageContent?.toContent().orEmpty().keys